diff --git a/qcd_function b/qcd_function index 8a87d8f..d089f84 100644 --- a/qcd_function +++ b/qcd_function @@ -48,13 +48,13 @@ function cd_history () { then \cd "$HOME" return fi + \cd "$1" touch "$HOME/.bash_cdhistory" old=$( tail -n 149 "$HOME/.bash_cdhistory" ) echo "$old" > "$HOME/.bash_cdhistory" - \cd "$1" p=$( pwd ) b=$( basename "$p" ) - echo $b":"$p >> "$HOME/.bash_cdhistory" + echo "$b:$p" >> "$HOME/.bash_cdhistory" } alias cd=cd_history