qcd - for previous
This commit is contained in:
@@ -114,7 +114,10 @@ Keeps a history of folders visited in ~/.bash_cdhistory
|
||||
unset OPTSTRING
|
||||
unset OPTIND
|
||||
if [ "$1" = "-" ]
|
||||
then \cd -; return
|
||||
then d=$( tail -n 1 ~/.bash_cdhistory )
|
||||
d=${d/*:/}
|
||||
\cd "$d"
|
||||
return
|
||||
fi
|
||||
d=$( grep $case -h ^"$1" ~/.qcd <( tac ~/.bash_cdhistory ) | head -n 1 )
|
||||
d=${d/*:/}
|
||||
|
||||
Reference in New Issue
Block a user