3

ConEmu runs zsh under CygWin fine.

I want to add a right click option to explorer to "Start ConEmu With CygWin Zsh In This Diretory"

ConEmu provides an Integration settings page to set explorer context menu integration commands, but I can't work out what to put in the Command field to open zsh in the current directory under the Command field.

To open git msys bash, '"%ProgramFiles(x86)%\Git\bin\sh.exe" --login -i' works, and bash opens in the directory open in Windows explorer, but if I try '"C:\CygWin\bin\zsh.exe" --login -i' it opens ZSH, but zsh always starts in ~/ instead of the folder open in Explorer.

2 Answers 2

3

I ran into the same issue and never got the working directory flag to open zsh in the specified directory. My workaround was to execute a cd command as part of the task's config:

C:\CygWin\bin\zsh.exe --login -i -c "cd C:\my\working\directory; exec zsh"
2

The new method is to use CHERE_INVOKING environment variable to avoid changing current directory:

SET CHERE_INVOKING=1 & c:\cygwin\bin\zsh.exe --login -i

See the details in ConEmu documentation.

1
  • 1
    Also this method allows you to run zsh just once rather that running a nested zsh inside another zsh instance like the other one does, and you won't get the "root process ran for less that 10 seconds" warning if you close conemu quickly. Commented Oct 27, 2019 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .