Adds cdw alias

This commit is contained in:
Thomas Forgione 2022-04-19 11:25:37 +02:00
parent b35bc69b88
commit 45210b6c8f
1 changed files with 8 additions and 0 deletions

View File

@ -60,6 +60,14 @@ mkcd() {
mkdir $1 && cd $1
}
# which && cd
cdw() {
f=`which $1`
if [ $? -eq 0 ]; then
cd `dirname $f`
fi
}
# Initialize thefuck
command -v thefuck > /dev/null 2>&1