Skip to content

Commit

Permalink
[fish] Workaround for failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
bitraid committed Jan 17, 2025
1 parent b8e925b commit 66373e1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions shell/key-bindings.fish
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Key bindings
# ------------
function fzf_key_bindings
test -t 0; or set -gx STDIN_NOT_TTY 1

function __fzf_defaults
# $1: Prepend to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS
Expand Down Expand Up @@ -93,8 +94,13 @@ function fzf_key_bindings
'string join0 -- $i\t(string replace -a -- \n \n\t $h[$i] | string collect);' \
'end'
end
eval (__fzfcmd) --read0 --print0 -q '(commandline)' --bind='enter:become:"string replace -a -- \n\t \n {2..} | string collect"' | read -lz result
and commandline -- $result
if test "$STDIN_NOT_TTY" = 1
eval $FZF_DEFAULT_COMMAND | eval (__fzfcmd) --read0 --print0 -q '(commandline)' --bind='enter:become:"string replace -a -- \n\t \n {2..} | string collect"' | read -lz result
and commandline -- $result
else
eval (__fzfcmd) --read0 --print0 -q '(commandline)' --bind='enter:become:"string replace -a -- \n\t \n {2..} | string collect"' | read -lz result
and commandline -- $result
end
else
builtin history | eval (__fzfcmd) -q '(commandline)' | read -l result
and commandline -- $result
Expand Down

0 comments on commit 66373e1

Please sign in to comment.