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

feat: specify shell via $AICHAT_SHELL #866

Merged
merged 1 commit into from
Sep 13, 2024
Merged

feat: specify shell via $AICHAT_SHELL #866

merged 1 commit into from
Sep 13, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Sep 13, 2024

On Unix-like OS, aichat detects the shell via $SHELL, then falls back to sh.
On Windows, aichat detects shell via PSModulePath, then falls back to cmd.

After this PR is merged, aichat will first detect the shell via AICHAT_SHELL.
Even if you use fish in Cygwin on Windows, you can ensure it works properly by setting AICHAT_SHELL.

close #864

@sigoden sigoden changed the title feat: support specifying shell via $AICHAT_SHELL feat: specify shell via $AICHAT_SHELL Sep 13, 2024
@sigoden
Copy link
Owner Author

sigoden commented Sep 13, 2024

Tested the following:

# Git Bash
export AICHAT_SHELL="C:\\Program Files\\Git\bin\\bash.exe"

# Msys2 Bash
export AICHAT_SHELL="C:\\msys64\\usr\\bin\\bash.exe"

# Msys2 Zsh
export AICHAT_SHELL="C:\\msys64\\usr\\bin\\zsh.exe"

# Msys2 Fish
set -x AICHAT_SHELL "C:\\msys64\\usr\\bin\\fish.exe"

@sigoden sigoden merged commit 0fb403a into main Sep 13, 2024
3 checks passed
@sigoden sigoden deleted the feat-shell branch September 13, 2024 11:56
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 this pull request may close these issues.

Cygwin Support for shell role
1 participant