dot/.config/scriptrc/cd.sh

20 lines
273 B
Bash
Raw Normal View History

2023-07-22 14:46:26 +02:00
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
}