]> gitweb @ CieloNegro.org - sugar.git/blobdiff - dot-files/_zshrc
Auto commit by The Sugar System.
[sugar.git] / dot-files / _zshrc
index 49c5ad2edea2b88b10344362bcd1e837eb60f1cb..50e0f91bb389949a564cdd4125c015e8aee5f337 100644 (file)
@@ -162,12 +162,13 @@ function percol_select_history() {
     local selected
     selected=$("${tac_cmd[@]}" "$HISTFILE" | \
         sed 's/^: [0-9]*:[0-9]*;//' | \
+        awk 'seen[$0] {next} {seen[$0]++; print}' | \
         percol --match-method regex --query "$LBUFFER")
     if [[ $? -eq 0 ]]; then
         BUFFER="$selected"
         CURSOR="$#BUFFER" # move cursor to the end of line
         zle redisplay
-        zle accept-line
+        #zle accept-line  # uncomment this to execute the selected one immediately.
     else
         zle redisplay
     fi