From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23901 invoked from network); 14 Sep 2004 16:42:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Sep 2004 16:42:21 -0000 Received: (qmail 62513 invoked from network); 14 Sep 2004 16:42:15 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Sep 2004 16:42:15 -0000 Received: (qmail 6657 invoked by alias); 14 Sep 2004 16:41:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7988 Received: (qmail 6647 invoked from network); 14 Sep 2004 16:41:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Sep 2004 16:41:30 -0000 Received: (qmail 61247 invoked from network); 14 Sep 2004 16:41:30 -0000 Received: from web61310.mail.yahoo.com (216.155.196.153) by a.mx.sunsite.dk with SMTP; 14 Sep 2004 16:41:27 -0000 Message-ID: <20040914163758.80589.qmail@web61310.mail.yahoo.com> Received: from [62.78.147.186] by web61310.mail.yahoo.com via HTTP; Tue, 14 Sep 2004 09:37:58 PDT Date: Tue, 14 Sep 2004 09:37:58 -0700 (PDT) From: Tero Niemela Subject: Re: Two simple questions To: zsh-users@sunsite.dk In-Reply-To: <20040913211024.GA31504@DervishD> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.5 required=6.0 tests=BAYES_44,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.5 Hi! > > 0) I'm seeing dirs like /bin /bin/ and even /bin// > in > > my PATH. > > You're looking > for something like (EXTENDED_GLOB must be set, for > the '#'): > > path=(${(qq)${path//\/##/\/}%/}) > > This converts multiple slashes to just one, and > then removes the > last one. The '(qq)' part is needed just in case > 'path' has elements with spaces in it. In some cases (Cygwin) it indeed does have spaces. However, your solution seems not to be optiomal: ~> export PATH=/bin:/usr/bin:/bin//:/bin/ ~> which ls /bin/ls ~> path=(${(qq)${path//\/##/\/}%/}) ~> echo $PATH '/bin':'/usr/bin':'/bin/' ~> which ls ls not found zsh: exit 1 ~> > > 1) I use cygwin+zsh and it works great. I have in > my > > windows explorer "Command prompt here" option that > > starts cmd.exe in the selected directory (with > > "cmd.exe /k 'cd %1'" or something). How could I > define > > a command in command line that gets executed after > all > > zsh configuration files? zsh && cd /some/path of > > course doesn't work. > > Just add that command at the end of the last > config file read. I did the following, works perfectly for me: Last line of ~/.zlogin is: [[ "$OSTYPE" = *cygwin* && $ARGC -eq 1 ]] && cd "$@" And this registry settings was added to Windows registry: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Folder\shell\command] @="Cygwin Here" [HKEY_CLASSES_ROOT\Folder\shell\command\command] @="\"C:\\cygwin\\bin\\zsh.exe\" -l -s \"%1\"" Thanks! __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail