zsh-users
 help / color / mirror / code / Atom feed
* Using Global aliases to make a "macro" shell
@ 2006-07-15 11:00 zzapper
  2006-07-15 16:05 ` Mikael Magnusson
  0 siblings, 1 reply; 6+ messages in thread
From: zzapper @ 2006-07-15 11:00 UTC (permalink / raw)
  To: zsh-users

Using Global aliases to make a "macro" shell

It took me a while to suss these

example:
> cp NF ND
Where NF means Newest File in directory and
ND is newsest directory

NF and ND are actually Global Aliases

alias -g ND='$(ls -d *(/om[1]))' # newset directory
alias -g NF='$(ls *(.om[1]))'    # newest file

Using these "primitives" ie NF,ND and others has saved me writing lots of 
repetive shell scripts.



-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips


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

end of thread, other threads:[~2006-07-17  9:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-15 11:00 Using Global aliases to make a "macro" shell zzapper
2006-07-15 16:05 ` Mikael Magnusson
2006-07-15 16:22   ` zzapper
2006-07-15 19:46     ` Mikael Magnusson
2006-07-15 22:22       ` zzapper
2006-07-17  9:24   ` 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).