delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/14/17:28:38

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <E08D1D96ABE2D2119B3300A0C94D23062B2FDD@hopper.logica.co.uk>
From: "Fieldhouse, Dirk" <Fieldhouse AT logica DOT com>
To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: running bash as an right click option for directories
Date: Fri, 14 May 1999 22:27:51 +0100
X-Mailer: Internet Mail Service (5.5.2448.0)

On Fri, 14 May 1999 14:17:14 +0200, "Jan-Friedrich Mutter"
<jmutter AT bigfoot DOT de> wrote to: "Raju K. V." <rajukv AT wipinfo DOT soft DOT net>

> My current Setting is:
> HKEY_CLASSES_ROOT\Directory\shell\Xterm here\
> HKEY_CLASSES_ROOT\Directory\shell\Xterm here\command
>     (Standard) = perl C:\MyPath\xterm.pl "%1"
> 
> xterm.pl invokes the xterm (run rxvt.exe -e bash) within a bash (should I
> paste my Perl Script in here?). Problem is that %1 contains only the short
> pathnames, i.e. "C:\Progra~1". This makes the prompt ugly.
> Maybe your '/k' hint could be the solution. I have to check this.

%L is the answer (instead of %1). But you may then suffer bizarre quoting
problems handling LFNs with spaces.

> Von: Raju K. V. <rajukv AT wipinfo DOT soft DOT net>
> An: cygwin AT sourceware DOT cygnus DOT com <cygwin AT sourceware DOT cygnus DOT com>
> Datum: Freitag, 14. Mai 1999 13:19
> Betreff: running bash as an right click option for directories
> 
> >please read the foll. registry trick
> >
> >To create a new right-click option to open a command
> >prompt window at the directory you are currently working from.
> >
> >Open your registry and find the key below.
> >
> >Create a new sub key called 'CommandPrompt' as in
> >[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]. Change the value of
> >'(default)' within the key to equal the text you would like on the
> >right-click menu, for example 'Command Prompt Here'.
> >
> >Create another new sub-key under the key created above, name this subkey
> >'command' as in:
> >[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command]. Change the
> >value of '(default)' within this key to:
> >
> >command.com /k cd "%1"
> >
> >Now my question is I want to do the same with bash. Can somebody tell me
> >what command line I should give to perform the above operation with bash?

Something like this, perhaps:

c:\path\to\sh.exe -c 'cd "%L" && exec /path/to/bash --login' 

/df

-- 
Dirk Fieldhouse                 Logica UK Limited
fieldhouse AT logica DOT com           75 Hampstead Road
c=gb;a=attmail;p=logica;        London NW1 2PL
o=LOGICA;ou1=UK;s=fieldhouse    UK
+44 (171) 637 9111


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019