history: Remove 'HISTFILE' path relocation warning

'HISTFILE' path relocation was done 2 years ago. It's time to cleanup
the warning message.
main
Indrajit Raychaudhuri 2 years ago
parent e7f75d20bc
commit 8d895a70a5

@ -42,28 +42,3 @@ if ! zstyle -t ':prezto:module:history:alias' skip; then
# Lists the ten most used commands. # Lists the ten most used commands.
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
fi fi
if [[ -s "${OLD_HISTFILE::=${HISTFILE:h}/.zhistory}" ]]; then
# New 'HISTFILE' doesn't exist yet, rename legacy one if available and notify.
if [[ ! -s "$HISTFILE" ]]; then
<<EON
NOTICE: Default path of 'HISTFILE' has changed from '${OLD_HISTFILE/#$HOME/~}'
to '${HISTFILE/#$HOME/~}'.
Attempting to rename the existing 'HISTFILE' ...
EON
command mv -v "$OLD_HISTFILE" "$HISTFILE"
# New 'HISTFILE' does exist and is older than legacy one, just warn.
elif [[ "$OLD_HISTFILE" -nt "$HISTFILE" ]]; then
<<EOW
WARNING: Default path of 'HISTFILE' has changed from '${OLD_HISTFILE/#$HOME/~}'
to '${HISTFILE/#$HOME/~}'.
Either set 'HISTFILE' in '${${0:h}/#$HOME/~}'
or move previous history from '${OLD_HISTFILE/#$HOME/~}' to
'${HISTFILE/#$HOME/~}'.
EOW
fi
unset OLD_HISTFILE
fi

Loading…
Cancel
Save