summaryrefslogtreecommitdiff
path: root/shell/completion.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'shell/completion.zsh')
-rw-r--r--shell/completion.zsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh
index e828a704..e791b3a7 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -2,10 +2,10 @@
# / __/___ / __/
# / /_/_ / / /_
# / __/ / /_/ __/
-# /_/ /___/_/-completion.zsh
+# /_/ /___/_/ completion.zsh
#
# - $FZF_TMUX (default: 0)
-# - $FZF_TMUX_HEIGHT (default: '40%')
+# - $FZF_TMUX_OPTS (default: '-d 40%')
# - $FZF_COMPLETION_TRIGGER (default: '**')
# - $FZF_COMPLETION_OPTS (default: empty)
@@ -99,9 +99,9 @@ fi
__fzf_comprun() {
if [[ "$(type _fzf_comprun 2>&1)" =~ function ]]; then
_fzf_comprun "$@"
- elif [ -n "$TMUX_PANE" ] && [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ]; then
+ elif [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] || [ -n "$FZF_TMUX_OPTS" ]; }; then
shift
- fzf-tmux -d "${FZF_TMUX_HEIGHT:-40%}" "$@"
+ fzf-tmux ${(Q)${(Z+n+)FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}}} -- "$@"
else
shift
fzf "$@"