Skip to content

Commit

Permalink
🐛 Fix Bash completion setup to .bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Mar 28, 2020
1 parent b28f920 commit 2eb158d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_completion/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_show_completion():


def test_install_completion():
bash_completion_path: Path = Path.home() / ".bash_completion"
bash_completion_path: Path = Path.home() / ".bashrc"
text = ""
if bash_completion_path.is_file(): # pragma: nocover
text = bash_completion_path.read_text()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_completion/test_completion_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_completion_install_no_shell():


def test_completion_install_bash():
bash_completion_path: Path = Path.home() / ".bash_completion"
bash_completion_path: Path = Path.home() / ".bashrc"
text = ""
if bash_completion_path.is_file():
text = bash_completion_path.read_text()
Expand Down
2 changes: 1 addition & 1 deletion typer/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def install(
shell, _ = shellingham.detect_shell()
mode = None
if shell == "bash":
path_obj = Path.home() / ".bash_completion"
path_obj = Path.home() / ".bashrc"
mode = mode or "a"
elif shell == "zsh":
path_obj = Path.home() / ".zshrc"
Expand Down

1 comment on commit 2eb158d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.