diff options
author | Alan Pearce | 2014-06-25 22:13:04 +0100 |
---|---|---|
committer | Alan Pearce | 2014-06-25 22:13:04 +0100 |
commit | 22db368a72cf34fc7a0a326afe2f38efd42ed171 (patch) | |
tree | 8ee1c74954aa6cc8ba8e6514c87e24a06f36d5b3 /tag-zsh/config/zsh | |
parent | 91dfffa76ff0d7c03a2c65c72e955b7409578697 (diff) | |
download | nixfiles-22db368a72cf34fc7a0a326afe2f38efd42ed171.tar.lz nixfiles-22db368a72cf34fc7a0a326afe2f38efd42ed171.tar.zst nixfiles-22db368a72cf34fc7a0a326afe2f38efd42ed171.zip |
zsh: Generalise '1' alias to 1‒5 and -1‒-5 (tail)
Diffstat (limited to 'tag-zsh/config/zsh')
-rwxr-xr-x | tag-zsh/config/zsh/zshrc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc index c78f92b9..b7688921 100755 --- a/tag-zsh/config/zsh/zshrc +++ b/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' |