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

Docs: Add Cygwin terminal #14977

Closed
ffes opened this Issue Nov 4, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@ffes

ffes commented Nov 4, 2016

  • VSCode Version: 1.7.1
  • OS Version: Win10

With the new command line options for Windows integrated terminal, it now is finally possible to start a proper working Cygwin terminal in the current project. GREAT!

For that you need to have base Cygwin and the chere package installed. There is not need to run the chere command and integrate Cygwin with your Explorer. The chere package is just needed for the /bin/xhere command that comes with it.

When you only use C:\\Cygwin\\bin\\bash.exe (so without these command line options) the Cygwin path is not set properly and bash is useless. And when you start C:\\Cygwin\\Cygwin.bat your path is set, but you end up in $HOME and not in the right directory.

Steps to reproduce:

  1. Install base Cygwin and add the chere package. (You might have to start Cygwin once to initialize it, not sure)
  2. Add these lines to the Workbench Settings:
// Cygwin, with chere package installed
"terminal.integrated.shell.windows": "C:\\Cygwin\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["/bin/xhere", "/bin/bash"],
  1. Open the terminal in VSCode and see a proper working Cygwin terminal (apart from #7345) appear in the current directory. In doubt type uname -a.

So please add the three lines above to https://code.visualstudio.com/docs/editor/integrated-terminal

@Tyriar Tyriar added this to the November 2016 milestone Nov 4, 2016

@Tyriar Tyriar modified the milestones: January 2017, November 2016 Dec 5, 2016

@Tyriar

This comment has been minimized.

Member

Tyriar commented Jan 6, 2017

Since this is a very specific quirk to Cygwin I don't think I'll add this, especially since other bash.exe's seem to work just fine so it will likely be fixed eventually.

@rfgamaral

This comment has been minimized.

rfgamaral commented Apr 17, 2017

This solution does not work with zsh instead of bash. The terminal opens and immediately closes. Anyway to debug this?

@rfgamaral

This comment has been minimized.

rfgamaral commented Apr 18, 2017

Got it working with:

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

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017

@Tyriar Tyriar reopened this Jun 4, 2018

@Tyriar Tyriar added this to the June 2018 milestone Jun 4, 2018

@Microsoft Microsoft unlocked this conversation Jun 4, 2018

@Tyriar Tyriar modified the milestones: June 2018, July 2018 Jun 25, 2018

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 23, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.