1
0
dotfiles/.config/zsh/alias/directories.zsh
2021-04-19 01:00:58 +03:00

17 lines
302 B
Bash

#!/bin/zsh
## alias -g ...='../..'
## alias -g ....='../../..'
## ...
for (( i=3 ; i < 10 ; i++ )) ; do
alias -g ${(l:i::.:)}='..'${(l:3*(i-2)::/..:)}
done ; unset i
alias -- -='cd -'
alias 1='cd -'
## alias 2='cd -2'
## ...
for (( i=2 ; i < 10 ; i++ )) ; do
alias $i="cd -$i"
done ; unset i