Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Rationalized? aliases



>> On Wed, 8 Nov 1995 15:36:43 -0800,
>> Barton E Schaefer(B) wrote:
B> } > % echo $ZSH_VERSION
B> } > 2.6-beta11
B> } > alias e="gnuclient -q"
B> } > % [[ $HOST != $HOMESYSTEM ]] && alias e="$(whence e) -h $HOMESYSTEM"
B> } > % type e
B> } > e is an alias for \''gnuclient -q'\'' -h spacely'
B> } > 

B> What's wrong with:

B> e="gnuclient -q"
B> [[ $HOST != $HOMESYSTEM ]] && alias e="$=e -h $HOMESYSTEM" || alias e="$=e"

B> ??  Why get "whence" involved at all?

An interesting idea, but it doesn't seem to do the same thing on my
system:

	$ e="gnuclient -q"
	$ echo $=e
	gnuclient -q
	$ alias e="$=e -h $HOMESYSTEM"
	$ type e
	e is an alias for gnuclient
	$ alias e="gnuclient -h $HOMESYSTEM"
	$ type e
	e is an alias for 'gnuclient -h foo'
	$

does it (HOMESYSTEM=foo here) ?

Unless this is an hzoli-ism...

  -mb-



Messages sorted by: Reverse Date, Date, Thread, Author