fzf: Remove Alt-s for sorting, remove useless --tiebreak
parent
05b888e41f
commit
2c20c7742f
|
@ -4,10 +4,10 @@ bind \e\ct fzf-file-widget
|
||||||
bind \ec capitalize-word
|
bind \ec capitalize-word
|
||||||
bind \eC fzf-cd-widget
|
bind \eC fzf-cd-widget
|
||||||
|
|
||||||
function fzf-select -d 'fzf commandline and print unescaped selection back to commandline'
|
function fzf-select -d 'Eval commandline, fzf result and print out selection'
|
||||||
set -l cmd (commandline -j)
|
set -l cmd (commandline -j)
|
||||||
[ "$cmd" ]; or return
|
[ "$cmd" ]; or return
|
||||||
eval $cmd | eval (__fzfcmd) -m --tiebreak=index --select-1 --exit-0 | string join ' ' | read -l result
|
eval $cmd | eval (__fzfcmd) -m --select-1 --exit-0 | string join ' ' | read -l result
|
||||||
[ "$result" ]; and commandline -j -- $result
|
[ "$result" ]; and commandline -j -- $result
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
|
@ -24,7 +24,7 @@ bind \e\cm fzf-select
|
||||||
function fzf-complete -d 'fzf completion and print selection back to commandline'
|
function fzf-complete -d 'fzf completion and print selection back to commandline'
|
||||||
set -l complist (complete -C(commandline -c))
|
set -l complist (complete -C(commandline -c))
|
||||||
set -l result
|
set -l result
|
||||||
string join -- \n $complist | sort | fzf -m --tiebreak=index --select-1 --exit-0 --header '(commandline)' | cut -f1 | while read -l r; set result $result $r; end
|
string join -- \n $complist | sort | fzf -m --select-1 --exit-0 --header '(commandline)' | cut -f1 | while read -l r; set result $result $r; end
|
||||||
|
|
||||||
set prefix (string sub -s 1 -l 1 -- (commandline -t))
|
set prefix (string sub -s 1 -l 1 -- (commandline -t))
|
||||||
for i in (seq (count $result))
|
for i in (seq (count $result))
|
||||||
|
|
2
.profile
2
.profile
|
@ -130,7 +130,7 @@ fi
|
||||||
|
|
||||||
## fzf
|
## fzf
|
||||||
if command -v fzf >/dev/null 2>&1; then
|
if command -v fzf >/dev/null 2>&1; then
|
||||||
export FZF_DEFAULT_OPTS="--reverse --inline-info --height 40% --cycle --extended --multi --select-1 --exit-0 --bind=ctrl-k:kill-line,ctrl-j:accept,alt-s:toggle-sort,ctrl-v:page-down,alt-v:page-up,alt-a:toggle-all,alt-i:toggle-up,alt-z:toggle-preview"
|
export FZF_DEFAULT_OPTS="--reverse --inline-info --height 40% --cycle --extended --multi --select-1 --exit-0 --bind=ctrl-k:kill-line,ctrl-j:accept,ctrl-v:page-down,alt-v:page-up,alt-a:toggle-all,alt-i:toggle-up,alt-z:toggle-preview"
|
||||||
export FZF_ALT_C_OPTS="--preview='preview {}'"
|
export FZF_ALT_C_OPTS="--preview='preview {}'"
|
||||||
export FZF_BCD_OPTS=$FZF_ALT_C_OPTS
|
export FZF_BCD_OPTS=$FZF_ALT_C_OPTS
|
||||||
export FZF_CDHIST_OPTS=$FZF_ALT_C_OPTS
|
export FZF_CDHIST_OPTS=$FZF_ALT_C_OPTS
|
||||||
|
|
Loading…
Reference in New Issue