touch if missing

This commit is contained in:
q
2015-07-26 21:46:23 +03:00
parent 0ca341e837
commit 0d14e02140

View File

@@ -6,6 +6,7 @@ function cd_history () {
then \cd "$HOME" then \cd "$HOME"
return return
fi fi
touch "$HOME/.bash_cdhistory"
old=$( tail -n 149 "$HOME/.bash_cdhistory" ) old=$( tail -n 149 "$HOME/.bash_cdhistory" )
echo "$old" > "$HOME/.bash_cdhistory" echo "$old" > "$HOME/.bash_cdhistory"
\cd "$1" \cd "$1"