浏览代码

lib: delete zsh session history list

NOTE: it still lives somewhere in the current zsh process. Run `fc -P` to
restore it.
Marc Cornellà 3 年之前
父节点
当前提交
bad9ee0004
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/history.zsh

+ 2 - 1
lib/history.zsh

@@ -6,7 +6,8 @@ function omz_history {
   if [[ -n "$clear" ]]; then
     # if -c provided, clobber the history file
     echo -n >| "$HISTFILE"
-    echo >&2 History file deleted. Reload the session to see its effects.
+    fc -p "$HISTFILE"
+    echo >&2 History file deleted.
   elif [[ -n "$list" ]]; then
     # if -l provided, run as if calling `fc' directly
     builtin fc "$@"