Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: zsh not supported #33

Open
Diwakar-Gupta opened this issue Mar 28, 2022 · 0 comments
Open

BUG: zsh not supported #33

Diwakar-Gupta opened this issue Mar 28, 2022 · 0 comments

Comments

@Diwakar-Gupta
Copy link

Diwakar-Gupta commented Mar 28, 2022

Describe the bug

When using non-bash shell say zsh, shell does not open.

In file aquarium.py,
executing subprocess.call([SHELL, "--init-file", f"{aliases_file}", "-i"])
produces error
/usr/bin/zsh: no such option: init_file

this is because zsh dont support providing init-file yet.

Expected Results

  1. Since zsh don't support init-file, it should always start bash insteed
  2. we can start bash only when default shell is zsh ie. if SHELL.endswith('zsh').
  3. make it work for zsh

Solution1.

SHELL="/usr/bin/bash"
subprocess.call([SHELL, "--init-file", f"{aliases_file}", "-i"])

Solution2.

if SHELL.endswith('zsh'):
subprocess.call(["/usr/bin/bash", "--init-file", f"{aliases_file}", "-i"])
else:
subprocess.call([SHELL, "--init-file", f"{aliases_file}", "-i"])

Solution3.

since zsh dont support init-file this has to be done the hard-way.

Any solution to support zsh with aliases is most welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant