zsh-users
 help / color / mirror / code / Atom feed
* Aliases with multiple names
@ 2004-03-16 19:15 zzapper
  2004-03-16 19:22 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: zzapper @ 2004-03-16 19:15 UTC (permalink / raw)
  To: zsh-users

Hi Ya
I want to give aliases long & short names (w/o duplicating the entire
alias)

alias fred='echo "goat"'

alias f=fred

Both f & fred now echo goat but is this actually "legal" and will it
always work?


zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Aliases with multiple names
  2004-03-16 19:15 Aliases with multiple names zzapper
@ 2004-03-16 19:22 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2004-03-16 19:22 UTC (permalink / raw)
  To: zsh-users

zzapper wrote:
> Hi Ya
> I want to give aliases long & short names (w/o duplicating the entire
> alias)
> 
> alias fred='echo "goat"'
> 
> alias f=fred
> 
> Both f & fred now echo goat but is this actually "legal" and will it
> always work?

Yes, aliases are evaluated recursively except that each individual alias
won't be expanded inside replacement text for itself.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-16 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-16 19:15 Aliases with multiple names zzapper
2004-03-16 19:22 ` Peter Stephenson

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).