Skip to content
Myr

[fish] Ignore empty environment variables

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 2ff7db1 · Browse files · 1 file+7 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−7 removed

  • other:+7 added−7 removed

1 file+7 added−7 removed

modified:shell/key-bindings.fish+7 added-7 removed
8 unmodified lines
9 set -l fzf_query $commandline[2]1011 # "-path \$dir'*/\\.*'" matches hidden files/folders inside $dir but not12 # $dir itself, even if hidden.13 set -q FZF_CTRL_T_COMMAND; or set -l FZF_CTRL_T_COMMAND "13 test -n "$FZF_CTRL_T_COMMAND"; or set -l FZF_CTRL_T_COMMAND "14 command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \15 -o -type f -print \16 -o -type d -print \17 -o -type l -print 2> /dev/null | sed 's@^\./@@'"1819 set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%19 test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%20 begin21 set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS"22 eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)' -m --query "'$fzf_query'"' | while read -l r; set result $result $r; end23 end
11 unmodified lines
35 commandline -f repaint36 end3738 function fzf-history-widget -d "Show command history"39 set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%39 test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%40 begin41 set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m"4243 set -l FISH_MAJOR (echo $version | cut -f1 -d.)
17 unmodified lines
61 set -l commandline (__fzf_parse_commandline)62 set -l dir $commandline[1]63 set -l fzf_query $commandline[2]6465 set -q FZF_ALT_C_COMMAND; or set -l FZF_ALT_C_COMMAND "65 test -n "$FZF_ALT_C_COMMAND"; or set -l FZF_ALT_C_COMMAND "66 command find -L \$dir -mindepth 1 \\( -path \$dir'*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\) -prune \67 -o -type d -print 2> /dev/null | sed 's@^\./@@'"68 set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%68 test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%69 begin70 set -lx FZF_DEFAULT_OPTS "--height $FZF_TMUX_HEIGHT --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS"71 eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)' +m --query "'$fzf_query'"' | read -l result72
8 unmodified lines
81 commandline -f repaint82 end8384 function __fzfcmd85 set -q FZF_TMUX; or set FZF_TMUX 086 set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%85 test -n "$FZF_TMUX"; or set FZF_TMUX 086 test -n "$FZF_TMUX_HEIGHT"; or set FZF_TMUX_HEIGHT 40%87 if [ $FZF_TMUX -eq 1 ]88 echo "fzf-tmux -d$FZF_TMUX_HEIGHT"89 else90 echo "fzf"
56 unmodified lines