by kstock · 12y ago · 0 comments
alias -g L=' | less '
which allows me to simply append "L" to a line to pipe the output to less. ls L
The pattern of short all-caps global aliases for ' | command 's make building/editing pipelines really easy/fast. alias -g C=' | wc -l '
alias -g A=' | ack-grep '
alias -g S=' | sort '
alias -g JQL=' | jq -C | less'
ls **/*png L
ls **/*png A -v regex C
curl $site JQL
puttingbindkey '^g' _expand_alias
in your zshrc allows you to expand aliases with <C-g>
You can find more global aliases and tips at: http://grml.org/zsh/zsh-lovers.html
touch 'L'
ls 'L'
ls \LMuch better is to use abbreviations which expand to the full command they abbreviate after you hit the space bar.[1]
This way you can see exactly what's going to be done before you hit ENTER. It does cost one extra keystroke, but the safety is worth it.