This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bash shell extension ?


> [HKEY_CLASSES_ROOT\Folder\shell\Bash Prompt]
> [HKEY_CLASSES_ROOT\Folder\shell\Bash Prompt\command]
> @="bash.exe -c 'cd \"%1\"; exec bash'"
> It seems you might also have to mount the drives you want to use.

Use single quotes for the cd command so that if the Windows shell
substitutes something ending in backslash for %1 it doesn't escape the close
quote.

Use the Directory key instead of the Folder one. (The difference being that
Folder includes fictions of the Windows shell namespace that don't
correspond to real directories.)

To allow invocation of a prompt via the context menu of a drive icon apply
the command to the Drive key as well as the Directory one.

Finally, by including a default value for the command, you can add an
underline shortcut to the context menu.

(Most of this is really nothing to do with cygwin - it's all standard
Windows stuff.)

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\BashHere]
@="&Bash Prompt Here"
[HKEY_CLASSES_ROOT\Directory\shell\BashHere\command]
@="c:\\cygwin\\bin\\bash.exe -c \"cd '%1' ; exec /bin/bash\""
[HKEY_CLASSES_ROOT\Drive\shell\BashHere]
@="&Bash Prompt Here"
[HKEY_CLASSES_ROOT\Drive\shell\BashHere\command]
@="c:\\cygwin\\bin\\bash.exe -c \"cd '%1' ; exec /bin/bash\""


--
Sam Edge



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]