Skip to content
Myr

[shell] Add $FZF_CTRL_T_OPTS and $FZF_ALT_C_OPTS

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

Close #596

authored by Junegunn Choi · committed by Junegunn Choi · parent 07f176f · Browse files · 4 files+10 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

4 files+10 added−7 removed

  • other:+10 added−7 removed

4 files+10 added−7 removed

modified:shell/key-bindings.bash+3 added-3 removed
modified:shell/key-bindings.fish+2 added-2 removed
17 unmodified lines
18 command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \19 -o -type f -print \20 -o -type d -print \21 -o -type l -print 2> /dev/null | sed 1d | cut -b3-"22 eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)" -m > $TMPDIR/fzf.result"22 eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)" -m $FZF_CTRL_T_OPTS > $TMPDIR/fzf.result"23 and for i in (seq 20); commandline -i (cat $TMPDIR/fzf.result | __fzf_escape) 2> /dev/null; and break; sleep 0.1; end24 commandline -f repaint25 rm -f $TMPDIR/fzf.result26 end
9 unmodified lines
36 set -q FZF_ALT_C_COMMAND; or set -l FZF_ALT_C_COMMAND "37 command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \38 -o -type d -print 2> /dev/null | sed 1d | cut -b3-"39 # Fish hangs if the command before pipe redirects (2> /dev/null)40 eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)" +m > $TMPDIR/fzf.result"40 eval "$FZF_ALT_C_COMMAND | "(__fzfcmd)" +m $FZF_ALT_C_OPTS > $TMPDIR/fzf.result"41 [ (cat $TMPDIR/fzf.result | wc -l) -gt 0 ]42 and cd (cat $TMPDIR/fzf.result)43 commandline -f repaint44 rm -f $TMPDIR/fzf.result
27 unmodified lines
modified:shell/key-bindings.zsh+2 added-2 removed
modified:README.md+3 added
176 unmodified lines
177fish.178179- `CTRL-T` - Paste the selected files and directories onto the command line180 - Set `FZF_CTRL_T_COMMAND` to override the default command181 - Set `FZF_CTRL_T_OPTS` to pass additional options182- `CTRL-R` - Paste the selected command from history onto the command line183 - Sort is disabled by default to respect chronological ordering184 - Press `CTRL-R` again to toggle sort185 - Set `FZF_CTRL_R_OPTS` to pass additional options186- `ALT-C` - cd into the selected directory187 - Set `FZF_ALT_C_COMMAND` to override the default command188 - Set `FZF_ALT_C_OPTS` to pass additional options189190If you're on a tmux session, fzf will start in a split pane. You may disable191this tmux integration by setting `FZF_TMUX` to 0, or change the height of the192pane with `FZF_TMUX_HEIGHT` (e.g. `20`, `50%`).
221 unmodified lines