From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from math.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with SMTP id KAA02822 for ; Thu, 9 Nov 1995 10:48:37 +1100 (EST) Received: by math.gatech.edu (5.x/SMI-SVR4) id AA27489; Wed, 8 Nov 1995 18:33:44 -0500 Resent-Date: Wed, 8 Nov 1995 15:36:43 -0800 Old-Return-Path: From: schaefer@z-code.ncd.com (Barton E. Schaefer) Message-Id: <951108153643.ZM22842@zyrcon.z-code.com> Date: Wed, 8 Nov 1995 15:36:43 -0800 In-Reply-To: Richard Coleman "Re: Rationalized? aliases" (Nov 8, 6:17pm) References: <199511082317.SAA29367@redwood.skiles.gatech.edu> Reply-To: schaefer@z-code.ncd.com X-Face: czU|*h"p8AX?4.I.yU.^s%TIMx|"-s,*'|#H^|e,QjE&!jL%<]:-.U/;khS%3a2BC5_d#)( mz=$$G0u9P&*N8cA~b[URf;lgKRif@#qEf[ltie#Gg0%6$b`e`k.Cgw:\qJx\\a7c(K7^3;gXW:e1@ J, zsh-workers@math.gatech.edu Subject: Re: Rationalized? aliases Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-Id: <"OGo0I3.0.Nj6.NvJem"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/574 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 8, 6:17pm, Richard Coleman wrote: } Subject: Re: Rationalized? aliases } } > Now however, the rationalized alias output makes this not work: } > } > % echo $ZSH_VERSION } > 2.6-beta11 } > alias e="gnuclient -q" } > % [[ $HOST != $HOMESYSTEM ]] && alias e="$(whence e) -h $HOMESYSTEM" } > % type e } > e is an alias for \''gnuclient -q'\'' -h spacely' } > } > This is not what I desire ('gnuclient -q' is not a valid command) - what } > I want is to append "-h spacely" to the alias. How can I do this? } } Rather than changing the code of zsh for this, maybe you should } just use } } alias e="$(whence e | tr -d \') -h" } } Doing things like this is what makes command substitution so } cool. What's wrong with: e="gnuclient -q" [[ $HOST != $HOMESYSTEM ]] && alias e="$=e -h $HOMESYSTEM" || alias e="$=e" ?? Why get "whence" involved at all? -- Bart Schaefer Vice President, Technology, Z-Code Software schaefer@z-code.com Division of NCD Software Corporation http://www.well.com/www/barts