From 0fa5338375ae2c5ccaeef448425ff5e4f693f777 Mon Sep 17 00:00:00 2001 From: Wu Zhenyu Date: Fri, 7 Oct 2022 15:27:54 +0800 Subject: [PATCH] Add '--preview-window=hidden' --- README.md | 18 +++++++++--------- zsh-fzf-history-search.zsh | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6dbf435..5ec26da 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,15 @@ plugins=(… zsh-fzf-history-search) ## Configuration Variables -| Variable | Default | Description | -| ----------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------- | -| `ZSH_FZF_HISTORY_SEARCH_BIND` | `'^r'` | Keybind to trigger fzf reverse search | -| `ZSH_FZF_HISTORY_SEARCH_FZF_ARGS` | `'+s +m -x -e'` | Arguments for `fzf` (might be updated, not recommended to override) | -| `ZSH_FZF_HISTORY_SEARCH_FZF_EXTRA_ARGS` | `''` | Extra arguments for `fzf` | -| `ZSH_FZF_HISTORY_SEARCH_END_OF_LINE` | `''` | Put the cursor on at the end of the line after completion, `empty=false` | -| `ZSH_FZF_HISTORY_SEARCH_EVENT_NUMBERS` | `1` | Include event numbers in search. Set to 0 to remove event numbers from the search. | -| `ZSH_FZF_HISTORY_SEARCH_DATES_IN_SEARCH` | `1` | Include ISO8601 timestamps in search. Set to 0 to remove them from the search. | -| `ZSH_FZF_HISTORY_SEARCH_REMOVE_DUPLICATES`| `''` | Remove duplicate entries from search. Only makes sense with `EVENT_NUMBERS` and `DATE_INSEARCH` 0 (false).| +| Variable | Default | Description | +| ----------------------------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `ZSH_FZF_HISTORY_SEARCH_BIND` | `'^r'` | Keybind to trigger fzf reverse search | +| `ZSH_FZF_HISTORY_SEARCH_FZF_ARGS` | `'+s +m -x -e --preview-window=hidden'` | Arguments for `fzf` (might be updated, not recommended to override) | +| `ZSH_FZF_HISTORY_SEARCH_FZF_EXTRA_ARGS` | `''` | Extra arguments for `fzf` | +| `ZSH_FZF_HISTORY_SEARCH_END_OF_LINE` | `''` | Put the cursor on at the end of the line after completion, `empty=false` | +| `ZSH_FZF_HISTORY_SEARCH_EVENT_NUMBERS` | `1` | Include event numbers in search. Set to 0 to remove event numbers from the search. | +| `ZSH_FZF_HISTORY_SEARCH_DATES_IN_SEARCH` | `1` | Include ISO8601 timestamps in search. Set to 0 to remove them from the search. | +| `ZSH_FZF_HISTORY_SEARCH_REMOVE_DUPLICATES`| `''` | Remove duplicate entries from search. Only makes sense with `EVENT_NUMBERS` and `DATE_INSEARCH` 0 (false).| ## TODO diff --git a/zsh-fzf-history-search.zsh b/zsh-fzf-history-search.zsh index 84a0b18..e36efe1 100644 --- a/zsh-fzf-history-search.zsh +++ b/zsh-fzf-history-search.zsh @@ -7,7 +7,7 @@ typeset -g ZSH_FZF_HISTORY_SEARCH_BIND='^r' # Args for fzf (( ! ${+ZSH_FZF_HISTORY_SEARCH_FZF_ARGS} )) && -typeset -g ZSH_FZF_HISTORY_SEARCH_FZF_ARGS='+s +m -x -e' +typeset -g ZSH_FZF_HISTORY_SEARCH_FZF_ARGS='+s +m -x -e --preview-window=hidden' # Extra args for fzf (( ! ${+ZSH_FZF_HISTORY_SEARCH_FZF_EXTRA_ARGS} )) &&