From: schaefer@z-code.ncd.com (Barton E. Schaefer)
To: Richard Coleman <coleman@math.gatech.edu>, zsh-workers@math.gatech.edu
Subject: Re: Rationalized? aliases
Date: Wed, 8 Nov 1995 15:36:43 -0800 [thread overview]
Message-ID: <951108153643.ZM22842@zyrcon.z-code.com> (raw)
In-Reply-To: Richard Coleman <coleman@math.gatech.edu> "Re: Rationalized? aliases" (Nov 8, 6:17pm)
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
next prev parent reply other threads:[~1995-11-08 23:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-11-08 20:57 Vinnie Shelton
1995-11-08 23:17 ` Richard Coleman
1995-11-08 23:36 ` Barton E. Schaefer [this message]
1995-11-09 0:52 ` Mark Borges
1995-11-09 1:07 ` Barton E. Schaefer
1995-11-09 11:13 ` Zoltan Hidvegi
1995-11-08 23:38 ` Vinnie Shelton
1995-11-09 2:12 ` Zefram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=951108153643.ZM22842@zyrcon.z-code.com \
--to=schaefer@z-code.ncd.com \
--cc=coleman@math.gatech.edu \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).