chiark / gitweb /
dot/zshrc: Use `hist_ignore_space' instead of the `zshaddhistory' hack.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 2 May 2018 12:43:25 +0000 (13:43 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 8 May 2018 14:15:56 +0000 (15:15 +0100)
I think the behaviour -- retaining the command only for the next line --
is better.

dot/zshrc

index 8af418a47e408b69d15795d23e2b9960b2baf91c..29a2ed694c368276263018972c0ee3e89e89bf10 100644 (file)
--- a/dot/zshrc
+++ b/dot/zshrc
@@ -123,6 +123,7 @@ unsetopt beep
 setopt extendedglob
 unsetopt flow_control
 setopt hist_ignore_all_dups
+setopt hist_ignore_space
 setopt ksh_glob
 setopt list_ambiguous
 setopt list_packed
@@ -131,13 +132,6 @@ unsetopt menu_complete
 setopt notify
 setopt share_history
 
-zshaddhistory () {
-  case "$1" in
-    " "*) return 2 ;;
-    *) return 0 ;;
-  esac
-}
-
 ###--------------------------------------------------------------------------
 ### Finishing touches.