summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/fzf-tmux6
-rw-r--r--shell/completion.bash2
-rw-r--r--shell/completion.zsh2
-rw-r--r--shell/key-bindings.bash2
-rw-r--r--shell/key-bindings.zsh2
-rwxr-xr-xtest/test_go.rb1
6 files changed, 7 insertions, 8 deletions
diff --git a/bin/fzf-tmux b/bin/fzf-tmux
index ab1c52eb..290ce87e 100755
--- a/bin/fzf-tmux
+++ b/bin/fzf-tmux
@@ -130,7 +130,7 @@ while [[ $# -gt 0 ]]; do
[[ -n "$skip" ]] && args+=("$arg")
done
-if [[ -z "$TMUX" || "$opt" =~ ^-h && "$columns" -le 40 || ! "$opt" =~ ^-h && "$lines" -le 15 ]]; then
+if [[ -z "$TMUX" ]]; then
"$fzf" "${args[@]}"
exit $?
fi
@@ -222,14 +222,14 @@ if [[ -n "$term" ]] || [[ -t 0 ]]; then
TMUX=$(echo $TMUX | cut -d , -f 1,2) tmux set-window-option synchronize-panes off \;\
set-window-option remain-on-exit off \;\
split-window $opt "${tmux_args[@]}" "$envs bash -c 'cd $(printf %q "$PWD"); exec -a fzf bash $argsf'" $swap \
- > /dev/null 2>&1
+ > /dev/null 2>&1 || { "$fzf" "${args[@]}"; exit $?; }
else
mkfifo $fifo1
cat <<< "\"$fzf\" $opts < $fifo1 > $fifo2; echo \$? > $fifo3 $close" >> $argsf
TMUX=$(echo $TMUX | cut -d , -f 1,2) tmux set-window-option synchronize-panes off \;\
set-window-option remain-on-exit off \;\
split-window $opt "${tmux_args[@]}" "$envs bash -c 'exec -a fzf bash $argsf'" $swap \
- > /dev/null 2>&1
+ > /dev/null 2>&1 || { "$fzf" "${args[@]}"; exit $?; }
cat <&0 > $fifo1 &
fi
cat $fifo2
diff --git a/shell/completion.bash b/shell/completion.bash
index 377afe56..2aec1d64 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -37,7 +37,7 @@ bind '"\e[0n": redraw-current-line'
__fzf_comprun() {
if [ "$(type -t _fzf_comprun 2>&1)" = function ]; then
_fzf_comprun "$@"
- elif [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] || [ -n "$FZF_TMUX_OPTS" ]; }; then
+ elif [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "$FZF_TMUX_OPTS" ]; }; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
diff --git a/shell/completion.zsh b/shell/completion.zsh
index e791b3a7..4c7922e5 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -99,7 +99,7 @@ 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 ] || [ -n "$FZF_TMUX_OPTS" ]; }; then
+ elif [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "$FZF_TMUX_OPTS" ]; }; then
shift
fzf-tmux ${(Q)${(Z+n+)FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}}} -- "$@"
else
diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash
index a0b9eae0..e157b076 100644
--- a/shell/key-bindings.bash
+++ b/shell/key-bindings.bash
@@ -27,7 +27,7 @@ __fzf_select__() {
if [[ $- =~ i ]]; then
__fzfcmd() {
- [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] || [ -n "$FZF_TMUX_OPTS" ]; } &&
+ [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "$FZF_TMUX_OPTS" ]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index f8cb7821..19608926 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -54,7 +54,7 @@ __fsel() {
}
__fzfcmd() {
- [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] && [ ${LINES:-40} -gt 15 ] || [ -n "$FZF_TMUX_OPTS" ]; } &&
+ [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "$FZF_TMUX_OPTS" ]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
diff --git a/test/test_go.rb b/test/test_go.rb
index 108b6eb6..420af34a 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -2036,7 +2036,6 @@ module CompletionTest
tmux.send_keys 'C-c'
# FZF_TMUX=1
- skip 'screen size too small' if `tput lines`.to_i < 15
new_shell
tmux.focus
tmux.send_keys 'unset FZFFOOBR**', :Tab