Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # cd to parent directory of the file (even if it is symbolic link)
- function pd() {
- local dir=`realpath ${1:-.}`
- cd $dir(:A:h)
- }
- # alias -g ...=../../, ....=../../../, .....=../../../../, ......
- eval `ruby -e "(2..20).each{|i| puts 'alias -g .'+'.'*i+'='+'../'*i}"`
Add Comment
Please, Sign In to add comment