From: zzapper <david@tvis.co.uk>
To: zsh-users@sunsite.dk
Subject: Using Global aliases to make a "macro" shell
Date: Sat, 15 Jul 2006 11:00:57 +0000 (UTC) [thread overview]
Message-ID: <Xns98017A3A81F80zzappergmailcom@80.91.229.5> (raw)
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
next reply other threads:[~2006-07-15 11:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-15 11:00 zzapper [this message]
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
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=Xns98017A3A81F80zzappergmailcom@80.91.229.5 \
--to=david@tvis.co.uk \
--cc=zsh-users@sunsite.dk \
/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).