-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Epic: Improved support for user-defined shells (e.g. fish / zsh, etc) #10105
Comments
Agree, as I have this issue/challenge with using fish terminal, however |
Yes, I think So the focus should be to resolve:
|
Yep, I think we should cover both cases(imagine someone set from their dockerfile), can we add |
Just noticed after daily driving Perhaps we should switch to other shells from bash env. |
.gitpod.yml:tasks
switch to user-defined SHELL after completion of running the the task commands
Hey folks, I have broadened the scope of this issue (the original description is in the toggle) to be an epic to contain other sub issues about improved support for user defined shells. I will start to update the description with other related issues. If you have issues with any shell when using Gitpod, please raise an issue with the specific issue you are facing, and we can then link it here to track general progress towards improved user-defined shell support 🙏 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Improve the support for user-defined shells such as zsh, fish, etc.
Includes, but not limited to:
SHELL
environment variableRelates to:
bash -e
) #13558Original issue description
Is your feature request related to a problem? Please describe
It would be nice to have Gitpod switch to the user defined(
terminal.integrated.defaultProfile.linux
) SHELL after processing the task commands inbash
.Describe the behaviour you'd like
.gitpod.yml
:Proposed solution
So, I think we could just put
; exec <user-shell>
(only if the user is not using bash as default) at the end of the script that we're sending to the task terminal, which could look like:We might also need to consider having an option for
.gitpod.yml
to disable the switching behavior as someone might not want it to switch on some specific use case.Describe alternatives you've considered
There are two ways I know of at this moment:
SHELL
env var in https://gitpod.io/variables or set in dockerfile to make the definedSHELL
globally be used across the workspace, @akosyakov shared this trick 👍However, this will cause issues since many of the bash builtins are either not present in other shells or behaves differently. On the other hand, we also have non POSIX shells like
fish
.PROMPT_COMMAND
) into$HOME/.bashrc
to runexec <shell>
upon detection of a task terminal and to switch only after the commands have been run. This is done via utilizing the dotfiles feature of Gitpod 1However, this is not a neat or straightforward method of doing this.
Additional context
Internal discussion on Slack.
Footnotes
https://github.com/axonasif/dotfiles/blob/5d50fdc8a6fd171ecf3ddeed6443ca45e1f817f3/src/main.sh#L61 ↩
The text was updated successfully, but these errors were encountered: