zsh: Generalise '1' alias to 1‒5 and -1‒-5 (tail)
Alan Pearce alan@alanpearce.co.uk
Wed, 25 Jun 2014 22:13:04 +0100
1 files changed, 5 insertions(+), 1 deletions(-)
jump to
M tag-zsh/config/zsh/zshrc → tag-zsh/config/zsh/zshrc
@@ -213,7 +213,11 @@ alias df='df -h' alias du='du -h' alias md='mkdir -p' alias rd='rmdir' -alias 1='head -n1' +for ((i = 1; i <= 5; i++)) +do + alias $i="head -n$i" + alias -$i="tail -n$i" +done alias .='source' ls='\ls'