17 lines
302 B
Bash
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
|