From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2662 invoked from network); 1 Apr 2002 13:04:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 1 Apr 2002 13:04:15 -0000 Received: (qmail 10651 invoked by alias); 1 Apr 2002 13:04:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4798 Received: (qmail 10639 invoked from network); 1 Apr 2002 13:04:02 -0000 X-Authentication-Warning: nymos.home.hr: mpeh set sender to marijan.peh@hi.hinet.hr using -f Date: Mon, 1 Apr 2002 12:31:18 +0200 From: Marijan Peh To: zsh-users Subject: Re: My zshrc; any sugestions welcome Message-ID: <20020401123118.A381@nymos.home.hr> Mail-Followup-To: 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: > 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" > } I just now noticed that it's not working for 'two_or_more' word job ex. If i run 'vi .Xresources .vimrc .slrnrc' it only shows 'vi' in titlebar. With '$1' it works perfectly? (shows complete line). Why is $1 bad? -- .~. 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 #4 ^^ ^^