Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Using Global aliases to make a "macro" shell
- X-seq: zsh-users 10515
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Using Global aliases to make a "macro" shell
- Date: Sat, 15 Jul 2006 11:00:57 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- Sender: news <news@xxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author