This is the mail archive of the cygwin 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: [INFO] Adding "Cygwin here" to Windows Explorer

kurtz <ivalladolidt at> writes:

> Thorsten Kampe escribió:
>> [HKEY_CLASSES_ROOT\Folder\shell\command\command]
>> @="C:\\cygwin\\bin\\rxvt.exe -e /bin/zsh --login -i -s \"%1\""
>> and...
>> if [[ $OSTYPE = cygwin && $ARGC = 1 ]]; then     cd $@; fi
> I set bash instead of zsh, and try to use $# instead of $ARGC, in my
> .bashrc. There, $# always has the value 0. Any ideas?

Right, bash doesn't seem to pass through the -s args to its init

I've hacked this as follows:

 1) In the registry entry:

   C:\cygwin\bin\rxvt.exe -fn 'Lucida Console-11' -geometry 80x48 -sl 300 -cr '#8b4513' -bg '#fffff0' -e /usr/bin/bash -c "XXX=\"%1\" bash --login -i"

 2) In my .bash_profile

  if [[ "x$XXX" != "x" ]]
    cd "$XXX"
    unset XXX

This is a moderately embarassing/messy hack -- can anyone do better?

 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail:
[mail really from me _always_ has this .sig -- mail without it is forged spam]

Unsubscribe info:
Problem reports:

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