Hyper: Ability to specify which shell to use

Created on 12 Jul 2016  路  21Comments  路  Source: vercel/hyper

For various reasons, I have my login shell set to /bin/bash, but prefer to use /usr/local/bin/fish as my default shell. I also have a couple profiles setup in iterm right now for bash, zsh, and fish in case I need to switch to a different shell for testing or debugging.

It would be nice to, at the very least, specify which shell to run for new tabs/windows. It would be even better to be able to setup multiple profiles for quick switching.

Most helpful comment

Makes total sense. This shall be an option in ~/.hyperterm.js

All 21 comments

Makes total sense. This shall be an option in ~/.hyperterm.js

So I'd like to make a PR for this, but I'm having a lot of trouble finding a way to set the shell/command to run when the session starts. Do you know of a good way to do this?

@mike-engel the shell is loaded in the Session class when we initialize the pty. You can add an extra parameter to the constructor to receive the shell, and then inspect the configuration in index.js to get the shell.

To get the configuration after plugins alter it, you can invoke plugins.getDecoratedConfig()

So I configured the shell option added by the pull request, but it has no effect for me.

Does fish need to be in /etc/shells for this config option to work?

@spudly I don't think a version of hyperterm has been release yet with this in it. Are you using a release version, or a version from master?

@mike-engel, oops, I see that you're right.

I confused myself because I initially installed hyperterm by cloning the repo, so my initial hyperterm config (with shell key set to '') was generated by code on master, which made me think the feature was released. Now that I'm running a released version, I don't have the feature anymore.

I'll just run fish manually until this is released.

@spudly Glad it was something simple. When it is released, however, it will be the path to the shell executable. i.e. /usr/local/bin/fish or /bin/bash, etc.

FYI https://hyperterm.org/ lists the "shell" config option, which doesn't currently work.

oops! that shouldn't have been deployed.

@mkscrg the good thing: we're landing that next. 0.7.0 shipping next

Hi,
I just found out that this feature was shipped and the shell property is working in the 0.7.0release. However I had to add it manually in my hyperterm.js.
There was no _default value_ nor any _shell_ entry.
Maybe it's because my config file already existed.
If this is the case, new options should be added in the file when upgrading hyperterm.
Thx for the awesome project !

Hi @dotlouis! In this case, a default key was not needed because we fall back to whatever your user's login shell is. So the default for new configs is simply an empty string. I agree though that adding it would have been best, so I'll look at writing a codemod or something next time.

I seem to be stuck on the first shell I loaded HyperTerm with. I was on Fish, changed with chsh -s /bin/bash asks for a password then says chsh: no changes made. If I open another shell, like Terminal, I'm on Bash. If I restart HyperTerm I'm still on Fish. I set the shell property to /bin/bash but it doesn't seem to change anything.

What am I missing?

Doh, I had the shell property outside the config. But, it's still weird that it defaulted to fish, even after I changed my shell, right?

Hyper seems to be ignoring my login shell. It's set to zsh but I get bash in Hyper while I get zsh in iTerm?

@bklebe I had exactly the same problem - latest update seems to fix it.

I am having this issue as well. When I installed Hyper my login shell was zsh but I changed to bash on my Mac and hyper is still using zsh. I had to set my shell manually in the preferences. I am using the latest version of hyper for mac (1.3.1).

Is it possible to specify the shell on a shortcut as well? I would like to switch from using Bash for Windows and Command Prompt.

I'm having same issue with above, and I have solved the issue by setting: shell: '/usr/local/bin/zsh' to .hyper.js (I have installed zsh from brew). But I think Hyper should take right login shell when open a new shell if shell option is not set.

Is it possible to reopen this issue? I had the same problem as everybody above, hyper won't update shell after shell changed with chsh command. May be the problem links to this issue in default-shell package?

Did this issue ever get resolved regarding the shell choice?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarneeh picture sarneeh  路  3Comments

leo picture leo  路  3Comments

yvan-sraka picture yvan-sraka  路  3Comments

laur1s picture laur1s  路  3Comments

stan-stripe picture stan-stripe  路  3Comments