Fix shell identification (#544)

This commit is contained in:
counterapparatus
2024-04-23 16:49:50 -05:00
committed by GitHub
parent a5e2afc6db
commit 20405b2ed2
+2 -2
View File
@@ -73,11 +73,11 @@ def install_shell_integration(*_args: Any) -> None:
# TODO: Add support for Windows.
# TODO: Implement updates.
shell = os.getenv("SHELL", "")
if shell == "/bin/zsh":
if "zsh" in shell:
typer.echo("Installing ZSH integration...")
with open(os.path.expanduser("~/.zshrc"), "a", encoding="utf-8") as file:
file.write(zsh_integration)
elif shell == "/bin/bash":
elif "bash" in shell:
typer.echo("Installing Bash integration...")
with open(os.path.expanduser("~/.bashrc"), "a", encoding="utf-8") as file:
file.write(bash_integration)