From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18338 invoked from network); 27 Mar 2002 00:10:43 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 27 Mar 2002 00:10:43 -0000 Received: (qmail 16691 invoked by alias); 27 Mar 2002 00:10:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4787 Received: (qmail 16673 invoked from network); 27 Mar 2002 00:10:16 -0000 X-Authentication-Warning: nymos.home.hr: mpeh set sender to marijan.peh@hi.hinet.hr using -f Date: Tue, 26 Mar 2002 18:49:58 +0100 From: Marijan Peh To: zsh-users Subject: Re: My zshrc; any sugestions welcome Message-ID: <20020326184958.A942@nymos.home.hr> Mail-Followup-To: Marijan Peh , zsh-users References: <20020325175935.A1729@nymos.home.hr> <20020326103835.A175@nymos.home.hr> <1020326151112.ZM32099@candle.brasslantern.com> <20020326174631.A831@nymos.home.hr> <1020326171031.ZM32266@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1020326171031.ZM32266@candle.brasslantern.com>; from schaefer@brasslantern.com on Tue, Mar 26, 2002 at 05:10:31PM +0000 X-Editor: VIM - Vi IMproved X-Operating-System: Linux nymos.home.hr 2.4.18-rmap On Tue, Mar 26, 2002 at 05:10:31PM +0000, Bart Schaefer wrote: [cut] > Oh, silly me. Single-element arrays are treated as scalars, so if the > command consists of only one word, you get only the first letter, but > if it consists of multiple words you get the first word. I never tried > it with a command with no arguments. > > So try this: > > preexec () { > print -Pn "\033]0;%n@%m ${${(@)${(z)1}:#*[[:punct:]]*}%% *} %~\007" > } Yep, that's the right thing. Thnx Kind regards Marijan Peh -- .~. marijan.peh@hi.hinet.hr /V\ /bin/zsh 4.1.0-dev-4 (i686-pc-linux-gnu) /( )\ Linux nymos.home.hr 2.4.18-rmap-rml #3 ^^ ^^