completion.bash
This file
Path
shell/completion.bash
599 lines · 17.0 KiB · Shell
Last changed by
[bash] Enable fuzzy path completion for all commands (#3958)Junegunn Choibefore adoptiona2d0e8f
History of this fileTake it
The walk stopped after 200 commits: lines older than 260a65b point at it.
0.51.0Junegunn Choibefore adoption260a65b
lines 1–6why, one step back1# ____ ____2# / __/___ / __/3# / /_/_ / / /_4# / __/ / /_/ __/5# /_/ /___/_/ completion.bash6#[shell] Add $FZF_COMPLETION_{DIR,PATH}_OPTSJunegunn Choibefore adoptioncd8d736
lines 7–12why, one step back7# - $FZF_TMUX (default: 0)8# - $FZF_TMUX_OPTS (default: empty)9# - $FZF_COMPLETION_TRIGGER (default: '**')10# - $FZF_COMPLETION_OPTS (default: empty)11# - $FZF_COMPLETION_PATH_OPTS (default: empty)12# - $FZF_COMPLETION_DIR_OPTS (default: empty)0.51.0Junegunn Choibefore adoption260a65b
lines 13–103why, one step back1314if [[ $- =~ i ]]; then151617# To use custom commands instead of find, override _fzf_compgen_{path,dir}18#19# _fzf_compgen_path() {20# echo "$1"21# command find -L "$1" \22# -name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \23# -a -not -path "$1" -print 2> /dev/null | command sed 's@^\./@@'24# }25#26# _fzf_compgen_dir() {27# command find -L "$1" \28# -name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \29# -a -not -path "$1" -print 2> /dev/null | command sed 's@^\./@@'30# }3132###########################################################3334# To redraw line after fzf closes (printf '\e[5n')35bind '"\e[0n": redraw-current-line' 2> /dev/null3637__fzf_defaults() {38 # $1: Prepend to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS39 # $2: Append to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS40 echo "--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore $1"41 command cat "${FZF_DEFAULT_OPTS_FILE-}" 2> /dev/null42 echo "${FZF_DEFAULT_OPTS-} $2"43}4445__fzf_comprun() {46 if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then47 _fzf_comprun "$@"48 elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then49 shift50 fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"51 else52 shift53 fzf "$@"54 fi55}5657__fzf_orig_completion() {58 local l comp f cmd59 while read -r l; do60 if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then61 comp="${BASH_REMATCH[1]}"62 f="${BASH_REMATCH[2]}"63 cmd="${BASH_REMATCH[3]}"64 [[ "$f" = _fzf_* ]] && continue65 printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"66 if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then67 __fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "68 fi69 fi70 done71}7273# @param $1 cmd - Command name for which the original completion is searched74# @var[out] REPLY - Original function name is returned75__fzf_orig_completion_get_orig_func() {76 local cmd orig_var orig77 cmd=$178 orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"79 orig="${!orig_var-}"80 REPLY="${orig##*#}"81 [[ $REPLY ]] && type "$REPLY" &> /dev/null82}8384# @param $1 cmd - Command name for which the original completion is searched85# @param $2 func - Fzf's completion function to replace the original function86# @var[out] REPLY - Completion setting is returned as a string to "eval"87__fzf_orig_completion_instantiate() {88 local cmd func orig_var orig89 cmd=$190 func=$291 orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"92 orig="${!orig_var-}"93 orig="${orig%#*}"94 [[ $orig == *' %s '* ]] || return 195 printf -v REPLY "$orig" "$func"96}9798_fzf_opts_completion() {99 local cur prev opts100 COMPREPLY=()101 cur="${COMP_WORDS[COMP_CWORD]}"102 prev="${COMP_WORDS[COMP_CWORD-1]}"103 opts="Add new options to bash completionJunegunn Choibefore adoption4c83d85
lines 104–106why, one step back104 +c --no-color105 +i --no-ignore-case106 +s --no-sort0.51.0Junegunn Choibefore adoption260a65b
line 107why, one step back107 +x --no-extendedAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 108–109why, one step back108 --ansi109 --bash0.51.0Junegunn Choibefore adoption260a65b
line 110why, one step back110 --bindAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 111–113why, one step back111 --border112 --border-label113 --border-label-pos0.51.0Junegunn Choibefore adoption260a65b
lines 114–115why, one step back114 --color115 --cycleAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 116–118why, one step back116 --disabled117 --ellipsis118 --expect0.51.0Junegunn Choibefore adoption260a65b
line 119why, one step back119 --filepath-wordAdd new options to bash completionJunegunn Choibefore adoption4c83d85
line 120why, one step back120 --fish0.51.0Junegunn Choibefore adoption260a65b
lines 121–122why, one step back121 --header122 --header-firstAdd new options to bash completionJunegunn Choibefore adoption4c83d85
line 123why, one step back123 --header-lines0.51.0Junegunn Choibefore adoption260a65b
line 124why, one step back124 --heightAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 125–138why, one step back125 --highlight-line126 --history127 --history-size128 --hscroll-off129 --info130 --jump-labels131 --keep-right132 --layout133 --listen134 --listen-unsafe135 --literal136 --man137 --margin138 --marker0.51.0Junegunn Choibefore adoption260a65b
line 139why, one step back139 --min-heightAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 140–145why, one step back140 --no-bold141 --no-clear142 --no-hscroll143 --no-mouse144 --no-scrollbar145 --no-separator0.51.0Junegunn Choibefore adoption260a65b
lines 146–147why, one step back146 --no-unicode147 --paddingAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 148–161why, one step back148 --pointer149 --preview150 --preview-label151 --preview-label-pos152 --preview-window153 --print-query154 --print0155 --prompt156 --read0157 --reverse158 --scheme159 --scroll-off160 --separator161 --sync0.51.0Junegunn Choibefore adoption260a65b
line 162why, one step back162 --tabstopAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 163–166why, one step back163 --tac164 --tiebreak165 --tmux166 --track0.51.0Junegunn Choibefore adoption260a65b
line 167why, one step back167 --versionAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 168–169why, one step back168 --with-nth169 --with-shell[completion] Use --wrap option in process completionJunegunn Choibefore adoptionb44ab9e
line 170why, one step back170 --wrapAdd new options to bash completionJunegunn Choibefore adoption4c83d85
lines 171–181why, one step back171 --zsh172 -0 --exit-0173 -1 --select-1174 -d --delimiter175 -e --exact176 -f --filter177 -h --help178 -i --ignore-case179 -m --multi180 -n --nth181 -q --query0.51.0Junegunn Choibefore adoption260a65b
lines 182–291why, one step back182 --"183184 case "${prev}" in185 --scheme)186 COMPREPLY=( $(compgen -W "default path history" -- "$cur") )187 return 0188 ;;189 --tiebreak)190 COMPREPLY=( $(compgen -W "length chunk begin end index" -- "$cur") )191 return 0192 ;;193 --color)194 COMPREPLY=( $(compgen -W "dark light 16 bw no" -- "$cur") )195 return 0196 ;;197 --layout)198 COMPREPLY=( $(compgen -W "default reverse reverse-list" -- "$cur") )199 return 0200 ;;201 --info)202 COMPREPLY=( $(compgen -W "default right hidden inline inline-right" -- "$cur") )203 return 0204 ;;205 --preview-window)206 COMPREPLY=( $(compgen -W "207 default208 hidden209 nohidden210 wrap211 nowrap212 cycle213 nocycle214 up top215 down bottom216 left217 right218 rounded border border-rounded219 sharp border-sharp220 border-bold221 border-block222 border-thinblock223 border-double224 noborder border-none225 border-horizontal226 border-vertical227 border-up border-top228 border-down border-bottom229 border-left230 border-right231 follow232 nofollow" -- "$cur") )233 return 0234 ;;235 --border)236 COMPREPLY=( $(compgen -W "rounded sharp bold block thinblock double horizontal vertical top bottom left right none" -- "$cur") )237 return 0238 ;;239 --border-label-pos|--preview-label-pos)240 COMPREPLY=( $(compgen -W "center bottom top" -- "$cur") )241 return 0242 ;;243 esac244245 if [[ "$cur" =~ ^-|\+ ]]; then246 COMPREPLY=( $(compgen -W "${opts}" -- "$cur") )247 return 0248 fi249250 return 0251}252253_fzf_handle_dynamic_completion() {254 local cmd ret REPLY orig_cmd orig_complete255 cmd="$1"256 shift257 orig_cmd="$1"258 if __fzf_orig_completion_get_orig_func "$cmd"; then259 "$REPLY" "$@"260 elif [[ -n "${_fzf_completion_loader-}" ]]; then261 orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)262 $_fzf_completion_loader "$@"263 ret=$?264 # _completion_loader may not have updated completion for the command265 if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then266 __fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)267268 # Update orig_complete by _fzf_orig_completion entry269 [[ $orig_complete =~ ' -F '(_fzf_[^ ]+)' ' ]] &&270 __fzf_orig_completion_instantiate "$cmd" "${BASH_REMATCH[1]}" &&271 orig_complete=$REPLY272273 if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then274 eval "${orig_complete/ -F / -o nospace -F }"275 else276 eval "$orig_complete"277 fi278 fi279 [[ $ret -eq 0 ]] && return 124280 return $ret281 fi282}283284__fzf_generic_path_completion() {285 local cur base dir leftover matches trigger cmd286 cmd="${COMP_WORDS[0]}"287 if [[ $cmd == \\* ]]; then288 cmd="${cmd:1}"289 fi290 COMPREPLY=()291 trigger=${FZF_COMPLETION_TRIGGER-'**'}[bash] Enable fuzzy path completion for all commands (#3958)Junegunn Choibefore adoptiona2d0e8f
line 292why, one step back292 [[ $COMP_CWORD -ge 0 ]] && cur="${COMP_WORDS[COMP_CWORD]}"0.51.0Junegunn Choibefore adoption260a65b
lines 293–310why, one step back293 if [[ "$cur" == *"$trigger" ]] && [[ $cur != *'$('* ]] && [[ $cur != *':='* ]] && [[ $cur != *'`'* ]]; then294 base=${cur:0:${#cur}-${#trigger}}295 eval "base=$base" 2> /dev/null || return296297 dir=298 [[ $base = *"/"* ]] && dir="$base"299 while true; do300 if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then301 leftover=${base/#"$dir"}302 leftover=${leftover/#\/}303 [[ -z "$dir" ]] && dir='.'304 [[ "$dir" != "/" ]] && dir="${dir/%\//}"305 matches=$(306 export FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse --scheme=path" "${FZF_COMPLETION_OPTS-} $2")307 unset FZF_DEFAULT_COMMAND FZF_DEFAULT_OPTS_FILE308 if declare -F "$1" > /dev/null; then309 eval "$1 $(printf %q "$dir")" | __fzf_comprun "$4" -q "$leftover"310 else[shell] Add $FZF_COMPLETION_{DIR,PATH}_OPTSJunegunn Choibefore adoptioncd8d736
lines 311–318why, one step back311 if [[ $1 =~ dir ]]; then312 walker=dir,follow313 rest=${FZF_COMPLETION_DIR_OPTS-}314 else315 walker=file,dir,follow,hidden316 rest=${FZF_COMPLETION_PATH_OPTS-}317 fi318 __fzf_comprun "$4" -q "$leftover" --walker "$walker" --walker-root="$dir" $rest0.51.0Junegunn Choibefore adoption260a65b
lines 319–410why, one step back319 fi | while read -r item; do320 printf "%q " "${item%$3}$3"321 done322 )323 matches=${matches% }324 [[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "325 if [[ -n "$matches" ]]; then326 COMPREPLY=( "$matches" )327 else328 COMPREPLY=( "$cur" )329 fi330 printf '\e[5n'331 return 0332 fi333 dir=$(command dirname "$dir")334 [[ "$dir" =~ /$ ]] || dir="$dir"/335 done336 else337 shift338 shift339 shift340 _fzf_handle_dynamic_completion "$cmd" "$@"341 fi342}343344_fzf_complete() {345 # Split arguments around --346 local args rest str_arg i sep347 args=("$@")348 sep=349 for i in "${!args[@]}"; do350 if [[ "${args[$i]}" = -- ]]; then351 sep=$i352 break353 fi354 done355 if [[ -n "$sep" ]]; then356 str_arg=357 rest=("${args[@]:$((sep + 1)):${#args[@]}}")358 args=("${args[@]:0:$sep}")359 else360 str_arg=$1361 args=()362 shift363 rest=("$@")364 fi365366 local cur selected trigger cmd post367 post="$(caller 0 | command awk '{print $2}')_post"368 type -t "$post" > /dev/null 2>&1 || post='command cat'369370 trigger=${FZF_COMPLETION_TRIGGER-'**'}371 cmd="${COMP_WORDS[0]}"372 cur="${COMP_WORDS[COMP_CWORD]}"373 if [[ "$cur" == *"$trigger" ]] && [[ $cur != *'$('* ]] && [[ $cur != *':='* ]] && [[ $cur != *'`'* ]]; then374 cur=${cur:0:${#cur}-${#trigger}}375376 selected=$(377 FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse" "${FZF_COMPLETION_OPTS-} $str_arg") \378 FZF_DEFAULT_OPTS_FILE='' \379 __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | command tr '\n' ' ')380 selected=${selected% } # Strip trailing space not to repeat "-o nospace"381 if [[ -n "$selected" ]]; then382 COMPREPLY=("$selected")383 else384 COMPREPLY=("$cur")385 fi386 printf '\e[5n'387 return 0388 else389 _fzf_handle_dynamic_completion "$cmd" "${rest[@]}"390 fi391}392393_fzf_path_completion() {394 __fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"395}396397# Deprecated. No file only completion.398_fzf_file_completion() {399 _fzf_path_completion "$@"400}401402_fzf_dir_completion() {403 __fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"404}405406_fzf_complete_kill() {407 _fzf_proc_completion "$@"408}409410_fzf_proc_completion() {[completion] Use --wrap option in process completionJunegunn Choibefore adoptionb44ab9e
line 411why, one step back411 _fzf_complete -m --header-lines=1 --no-preview --wrap -- "$@" < <(0.51.0Junegunn Choibefore adoption260a65b
line 412why, one step back412 command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||fix: Add fallback for cygwin ps (#3955)Eduardo D Sanchezbefore adoptionc423c49
lines 413–414why, one step back413 command ps -eo user,pid,ppid,time,args 2> /dev/null || # For BusyBox414 command ps --everyone --full --windows # For cygwin0.51.0Junegunn Choibefore adoption260a65b
lines 415–483why, one step back415 )416}417418_fzf_proc_completion_post() {419 command awk '{print $2}'420}421422# To use custom hostname lists, override __fzf_list_hosts.423# The function is expected to print hostnames, one per line as well as in the424# desired sorting and with any duplicates removed, to standard output.425#426# e.g.427# # Use bash-completions’s _known_hosts_real() for getting the list of hosts428# __fzf_list_hosts() {429# # Set the local attribute for any non-local variable that is set by _known_hosts_real()430# local COMPREPLY=()431# _known_hosts_real ''432# printf '%s\n' "${COMPREPLY[@]}" | command sort -u --version-sort433# }434if ! declare -F __fzf_list_hosts > /dev/null; then435 __fzf_list_hosts() {436 command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | command awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \437 <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts 2> /dev/null | command tr ',' '\n' | command tr -d '[' | command awk '{ print $1 " " $1 }') \438 <(command grep -v '^\s*\(#\|$\)' /etc/hosts 2> /dev/null | command grep -Fv '0.0.0.0' | command sed 's/#.*//') |439 command awk '{for (i = 2; i <= NF; i++) print $i}' | command sort -u440 }441fi442443_fzf_host_completion() {444 _fzf_complete +m -- "$@" < <(__fzf_list_hosts)445}446447# Values for $1 $2 $3 are described here448# https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html449# > the first argument ($1) is the name of the command whose arguments are being completed,450# > the second argument ($2) is the word being completed,451# > and the third argument ($3) is the word preceding the word being completed on the current command line.452_fzf_complete_ssh() {453 case $3 in454 -i|-F|-E)455 _fzf_path_completion "$@"456 ;;457 *)458 local user=459 [[ "$2" =~ '@' ]] && user="${2%%@*}@"460 _fzf_complete +m -- "$@" < <(__fzf_list_hosts | command awk -v user="$user" '{print user $0}')461 ;;462 esac463}464465_fzf_var_completion() {466 _fzf_complete -m -- "$@" < <(467 declare -xp | command sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'468 )469}470471_fzf_alias_completion() {472 _fzf_complete -m -- "$@" < <(473 alias | command sed -En 's|^alias ([^=]+).*|\1|p'474 )475}476477# fzf options478complete -o default -F _fzf_opts_completion fzf479# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf480# itself. As a quick improvement we take fzf's completion. Adding the few extra481# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.482complete -o default -F _fzf_opts_completion fzf-tmux483[bash] Enable fuzzy path completion for all commands (#3958)Junegunn Choibefore adoptiona2d0e8f
lines 484–521why, one step back484# Default path completion485__fzf_default_completion() {486 __fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"487488 # Dynamic completion loader has updated the completion for the command489 if [[ $? -eq 124 ]]; then490 # We trigger _fzf_setup_completion so that fuzzy completion for the command491 # still works. However, loader can update the completion for multiple492 # commands at once, and fuzzy completion will no longer work for those493 # other commands. e.g. pytest -> py.test, pytest-2, pytest-3, etc494 _fzf_setup_completion path "$1"495 return 124496 fi497}498499if complete | command grep -q __fzf_default_completion; then500 : # Default completion already set up. Do nothing.501elif ! complete | command grep -- '-D$' | command grep -qv _comp_complete_load &&502 complete -D -F __fzf_default_completion -o default -o bashdefault 2> /dev/null; then503 a_cmds=""504else505 # We can't set up default completion,506 # 1. if it's already set up by another script507 # 2. or if the current version of bash doesn't support -D option508 #509 # NOTE: $FZF_COMPLETION_PATH_COMMANDS and $FZF_COMPLETION_VAR_COMMANDS are510 # undocumented and subject to change in the future.511 a_cmds="${FZF_COMPLETION_PATH_COMMANDS-"512 awk bat cat code diff diff3513 emacs emacsclient ex file ftp g++ gcc gvim head hg hx java514 javac ld less more mvim nvim patch perl python ruby515 sed sftp sort source tail tee uniq vi view vim wc xdg-open516 basename bunzip2 bzip2 chmod chown curl cp dirname du517 find git grep gunzip gzip hg jar518 ln ls mv open rm rsync scp519 svn tar unzip zip"}"520fi5210.51.0Junegunn Choibefore adoption260a65b
lines 522–599why, one step back522d_cmds="${FZF_COMPLETION_DIR_COMMANDS-cd pushd rmdir}"523524v_cmds="${FZF_COMPLETION_VAR_COMMANDS-export unset printenv}"525526# Preserve existing completion527__fzf_orig_completion < <(complete -p $d_cmds $a_cmds $v_cmds unalias kill ssh 2> /dev/null)528529if type _comp_load > /dev/null 2>&1; then530 # _comp_load was added in bash-completion 2.12 to replace _completion_loader.531 # We use it without -D option so that it does not use _comp_complete_minimal as the fallback.532 _fzf_completion_loader=_comp_load533elif type __load_completion > /dev/null 2>&1; then534 # In bash-completion 2.11, _completion_loader internally calls __load_completion535 # and if it returns a non-zero status, it sets the default 'minimal' completion.536 _fzf_completion_loader=__load_completion537elif type _completion_loader > /dev/null 2>&1; then538 _fzf_completion_loader=_completion_loader539fi540541__fzf_defc() {542 local cmd func opts REPLY543 cmd="$1"544 func="$2"545 opts="$3"546 if __fzf_orig_completion_instantiate "$cmd" "$func"; then547 eval "$REPLY"548 else549 complete -F "$func" $opts "$cmd"550 fi551}552553# Anything554for cmd in $a_cmds; do555 __fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"556done557558# Directory559for cmd in $d_cmds; do560 __fzf_defc "$cmd" _fzf_dir_completion "-o bashdefault -o nospace -o dirnames"561done562563# Variables564for cmd in $v_cmds; do565 __fzf_defc "$cmd" _fzf_var_completion "-o default -o nospace -v"566done567568# Aliases569__fzf_defc unalias _fzf_alias_completion "-a"570571# Processes572__fzf_defc kill _fzf_proc_completion "-o default -o bashdefault"573574# ssh575__fzf_defc ssh _fzf_complete_ssh "-o default -o bashdefault"576577unset cmd d_cmds a_cmds v_cmds578579_fzf_setup_completion() {580 local kind fn cmd581 kind=$1582 fn=_fzf_${1}_completion583 if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then584 echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."585 return 1586 fi587 shift588 __fzf_orig_completion < <(complete -p "$@" 2> /dev/null)589 for cmd in "$@"; do590 case "$kind" in591 dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;592 var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;593 alias) __fzf_defc "$cmd" "$fn" "-a" ;;594 *) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;595 esac596 done597}598599fi