Skip to content
Myr

:bug: Fix Bash completion install to .bashrc (#81)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* :bug: Fix Bash completion setup to .bashrc * :memo: Update docs and script for Windows development environment

authored by Sebastián Ramírez · committed by GitHub · parent b28f920 · Browse files · 5 files+74 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+74 added−9 removed

  • tests:+2 added−2 removed
  • other:+72 added−7 removed

5 files+74 added−9 removed

modified:docs/contributing.md+70 added-5 removed
modified:scripts/docs-live.sh+1 added-1 removed
1#!/usr/bin/env bash23set -e45mkdocs serve --dev-addr 0.0.0.0:80085mkdocs serve --dev-addr 127.0.0.1:8008
modified:tests/test_completion/test_completion_install.py+1 added-1 removed
28 unmodified lines
29 assert "Error: --install-completion option requires an argument" in result.stderr303132def test_completion_install_bash():33 bash_completion_path: Path = Path.home() / ".bash_completion"33 bash_completion_path: Path = Path.home() / ".bashrc"34 text = ""35 if bash_completion_path.is_file():36 text = bash_completion_path.read_text()37 result = subprocess.run(
103 unmodified lines
modified:tests/test_completion/test_completion.py+1 added-1 removed
20 unmodified lines
21 assert "_TUTORIAL001.PY_COMPLETE=complete_bash" in result.stdout222324def test_install_completion():25 bash_completion_path: Path = Path.home() / ".bash_completion"25 bash_completion_path: Path = Path.home() / ".bashrc"26 text = ""27 if bash_completion_path.is_file(): # pragma: nocover28 text = bash_completion_path.read_text()29 result = subprocess.run(
145 unmodified lines
modified:typer/completion.py+1 added-1 removed
164 unmodified lines
165 if shell is None and shellingham is not None:166 shell, _ = shellingham.detect_shell()167 mode = None168 if shell == "bash":169 path_obj = Path.home() / ".bash_completion"169 path_obj = Path.home() / ".bashrc"170 mode = mode or "a"171 elif shell == "zsh":172 path_obj = Path.home() / ".zshrc"173 mode = mode or "a"
224 unmodified lines