dotfiles/shell/cd.sh

15 lines
159 B
Bash
Raw Normal View History

2017-01-26 13:48:55 +01:00
#!/bin/sh
2017-01-26 13:48:55 +01:00
#correct some fast tipped cds
c() {
2021-12-06 12:41:02 +01:00
if [ "$1" = "d.." ]; then
2017-01-26 13:48:55 +01:00
cd ..;
pwd;
fi
if [ -d "$1" ]; then
2021-12-06 12:41:02 +01:00
cd "$1" || exit;
2017-01-26 13:48:55 +01:00
pwd;
fi
return 0;
}