Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Rationalized? aliases
- X-seq: zsh-workers 574
- From: schaefer@xxxxxxxxxxxxxx (Barton E. Schaefer)
- To: Richard Coleman <coleman@xxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Rationalized? aliases
- Date: Wed, 8 Nov 1995 15:36:43 -0800
- In-reply-to: Richard Coleman <coleman@xxxxxxxxxxxxxxx> "Re: Rationalized? aliases" (Nov 8, 6:17pm)
- References: <199511082317.SAA29367@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxxxxxxxxx
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@xxxxxxxxxx Division of NCD Software Corporation
http://www.well.com/www/barts
Messages sorted by:
Reverse Date,
Date,
Thread,
Author