summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-07-04 11:24:08 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-07-04 11:24:08 +0900
commitae72b0fb70481f4b6d94b1ab139e1795a9d9d2ca (patch)
tree2d3ba00ccb5b8b6fad0346b487eae4875250d200 /shell
parentec85fd552d2922244ae92377b634b77526bbd59d (diff)
parenta79d080ea8409893464f69a4cba9029a6ffcb484 (diff)
downloadfzf-ae72b0fb70481f4b6d94b1ab139e1795a9d9d2ca.tar.gz
Merge pull request #285 from evverx/possible-retry-loop
[bash-completion] Fix g++: possible retry loop
Diffstat (limited to 'shell')
-rw-r--r--shell/completion.bash5
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index d9e7d447..1e03b073 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -74,9 +74,10 @@ _fzf_opts_completion() {
}
_fzf_handle_dynamic_completion() {
- local cmd orig ret
+ local cmd orig ret orig_cmd
cmd="$1"
shift
+ orig_cmd="$1"
orig=$(eval "echo \$_fzf_orig_completion_$cmd")
if [ -n "$orig" ] && type "$orig" > /dev/null 2>&1; then
@@ -84,7 +85,7 @@ _fzf_handle_dynamic_completion() {
elif [ -n "$_fzf_completion_loader" ]; then
_completion_loader "$@"
ret=$?
- eval $(complete | \grep "\-F.* $cmd$" | _fzf_orig_completion_filter)
+ eval $(complete | \grep "\-F.* $orig_cmd$" | _fzf_orig_completion_filter)
source $BASH_SOURCE
return $ret
fi