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

Using Global aliases to make a "macro" shell



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