From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25253 invoked from network); 13 Sep 2004 21:09:12 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Sep 2004 21:09:12 -0000 Received: (qmail 57751 invoked from network); 13 Sep 2004 21:09:06 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Sep 2004 21:09:06 -0000 Received: (qmail 17451 invoked by alias); 13 Sep 2004 21:08:23 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7985 Received: (qmail 17441 invoked from network); 13 Sep 2004 21:08:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Sep 2004 21:08:22 -0000 Received: (qmail 56641 invoked from network); 13 Sep 2004 21:08:22 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 13 Sep 2004 21:08:21 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212] helo=dervishd.net) by ns9.hostinglmi.net with esmtpa (Exim 4.42) id 1C6y3j-00057Y-Cu; Mon, 13 Sep 2004 23:08:24 +0200 Date: Mon, 13 Sep 2004 23:10:24 +0200 From: DervishD To: Tero Niemela Cc: zsh-users@sunsite.dk Subject: Re: Two simple questions Message-ID: <20040913211024.GA31504@DervishD> Mail-Followup-To: Tero Niemela , zsh-users@sunsite.dk References: <20040913155253.56857.qmail@web61306.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040913155253.56857.qmail@web61306.mail.yahoo.com> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-PopBeforeSMTPSenders: raul@dervishd.net X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi Tero :) * Tero Niemela dixit: > 0) I'm seeing dirs like /bin /bin/ and even /bin// in > my PATH. What would be the best way to clean up the > trailing slashes? "typeset -U path" won't clean up > paths if they have different number of trailing > slashes (I mean all those mentioned paths are left but > other instances of, e.g., /bin are of course cleaned). 'typeset -U' just 'uniqize', it doesn't normalize. 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. > 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. If the shell is interactive, try /etc/zshrc (well, I don't know which name it has under cygwin, sorry). Hope that helps :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/