浏览代码

Allow overriding -l flag in history

Marc Cornellà 9 年之前
父节点
当前提交
f8180c3a64
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/history.zsh

+ 2 - 0
lib/history.zsh

@@ -5,6 +5,8 @@ function omz_history {
   if [[ "${@[(i)-c]}" -le $# ]]; then
     echo -n >| "$HISTFILE"
     echo >&2 History file deleted. Reload the session to see its effects.
+  elif [[ "${@[(i)-l]}" -le $# ]]; then
+    builtin fc "$@"
   else
     builtin fc "$@" -l 1
   fi