Skip to content
Myr

[bash] Fix infinite loop on tab completion

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

awk may not set OFS to match FS depending on the implementation. Close #1227

authored by Junegunn Choi · committed by Junegunn Choi · parent 6eac4af · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:shell/completion.bash+1 added-1 removed
37 unmodified lines
38}3940__fzf_orig_completion_filter() {41 sed 's/^\(.*-F\) *\([^ ]*\).* \([^ ]*\)$/export _fzf_orig_completion_\3="\1 %s \3 #\2"; [[ "\1" = *" -o nospace "* ]] \&\& [[ ! "$__fzf_nospace_commands" = *" \3 "* ]] \&\& __fzf_nospace_commands="$__fzf_nospace_commands \3 ";/' |42 awk -F= '{gsub(/[^A-Za-z0-9_= ;]/, "_", $1);}1'42 awk -F= '{OFS = FS} {gsub(/[^A-Za-z0-9_= ;]/, "_", $1);}1'43}4445_fzf_opts_completion() {46 local cur prev opts
286 unmodified lines