dot/.config/scriptrc/cd.sh
2023-07-22 14:49:09 +02:00

19 lines
273 B
Bash

function cd
{
if [ $# -eq 0 ]; then
pushd ~ > /dev/null
elif [ " $1" = " -" ]; then
pushd "$OLDPWD" > /dev/null
else
pushd "$@" > /dev/null
fi
}
function cdd
{
if [ $# -eq 0 ]; then
cd -
else
cd +$1
fi
}