Update bash completion *for* fzf

This commit is contained in:
Junegunn Choi 2015-03-06 10:42:38 +09:00
parent 55828f389a
commit 1304428003

View File

@ -14,17 +14,17 @@ _fzf_orig_completion_filter() {
} }
_fzf_opts_completion() { _fzf_opts_completion() {
local cur prev opts local cur opts
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts=" opts="
-x --extended -x --extended
-e --extended-exact -e --extended-exact
-i +i -i +i
-n --nth -n --nth
-d --delimiter -d --delimiter
-s --sort +s +s --no-sort
--tac
-m --multi -m --multi
--no-mouse --no-mouse
+c --no-color +c --no-color
@ -36,14 +36,8 @@ _fzf_opts_completion() {
-1 --select-1 -1 --select-1
-0 --exit-0 -0 --exit-0
-f --filter -f --filter
--print-query" --print-query
--sync"
case "${prev}" in
--sort|-s)
COMPREPLY=( $(compgen -W "$(seq 2000 1000 10000)" -- ${cur}) )
return 0
;;
esac
if [[ ${cur} =~ ^-|\+ ]]; then if [[ ${cur} =~ ^-|\+ ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )