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

Is it possible to configure Babun/ZSH for the integrated terminal on Windows? #24588

Closed
rfgamaral opened this issue Apr 12, 2017 · 8 comments
Closed
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@rfgamaral
Copy link

rfgamaral commented Apr 12, 2017

This is "working":

"terminal.integrated.shell.windows": "C:\\Users\\Username\\.babun\\cygwin\\bin\\mintty.exe",
"terminal.integrated.shellArgs.windows": [
    "/bin/env",
    "CHERE_INVOKING=1",
    "/bin/zsh.exe"
],

The only problem is that a new window is opened instead of the integrated terminal.

The command and arguments were taken from here.

Does anyone if it's possible to have the ZSH shell on the integrated terminal and on Windows?

@rfgamaral
Copy link
Author

I went another route and installed Cygwin with ZSH and Oh My Zsh and configure VS Code like this:

"terminal.integrated.shell.windows": "C:\\Cygwin\\bin\\zsh.exe",
"terminal.integrated.shellArgs.windows": [
    "-lic",
    "cd $OLDPWD; exec zsh"
]

For now this is working nicely and it's probably a better a option than Babun which hasn't been updated in a while.

Feel free to close this if no longer relevant...

@rfgamaral
Copy link
Author

Updating my solution about... It works most of the time, but in some situations $OLDPWD might not have the expected value.

For instance, after running some commands (I noticed this by running antigen reset) in the terminal, you close it and reopen it, the $OLDPWD might have a different value and not the root project folder as expected.

@Tyriar
Copy link
Member

Tyriar commented Apr 17, 2017

Good to hear you got it working. This might be useful for you as well #14977

@Tyriar Tyriar closed this as completed Apr 17, 2017
@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Apr 17, 2017
@rfgamaral
Copy link
Author

@Tyriar The solution on that issue didn't work for zsh instead of bash. The terminal opens and immediately closes. Anyway to debug this?

@Tyriar
Copy link
Member

Tyriar commented Apr 17, 2017

@rfgamaral no way to debug currently, an immediate close typically means if you ran the command in an external terminal it would exit immediately as well.

@rfgamaral
Copy link
Author

rfgamaral commented Apr 18, 2017

@Tyriar The following worked:

"terminal.integrated.shell.windows": "C:\\Cygwin64\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["/bin/xhere", "/bin/zsh"]

Just started bash.exe instead of zsh.exe :)

@prameshbajra
Copy link

Is it only me who didn't have do do much. I just did this:

`"terminal.integrated.shell.windows": "C:\\Users\\YOURUSERNAME\\.babun\\cygwin\\bin\\zsh.exe",`

and it works fine. Or is it due to recent updates?

@gtdminh
Copy link

gtdminh commented Jul 17, 2017

hey, i tried following to run bash in current open folder
"terminal.integrated.shell.windows": "C:\\Cygwin\\bin\\zsh.exe", "terminal.integrated.shellArgs.windows": ["-lic", "cd $OLDPWD; exec bash"]
it works perfectly

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants