mirror of
https://github.com/TheR1D/shell_gpt.git
synced 2026-07-03 14:10:18 +02:00
Fix shell identification (#544)
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user