summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorptzz <ponca707@gmail.com>2018-05-04 07:55:48 +0200
committerJunegunn Choi <junegunn.c@gmail.com>2018-05-04 14:55:48 +0900
commit1fb0fbca586d88666a906b910f2644e87d30d265 (patch)
treecd1dd142d52ab52a31314bcd8f238d406603cd44 /shell
parentddd2a109e4746160d1b88a438e3ea8bfa1c78e48 (diff)
downloadfzf-1fb0fbca586d88666a906b910f2644e87d30d265.tar.gz
[bash] Do not print error when falling back to default completion (#1279)
Fixes #1278
Diffstat (limited to 'shell')
-rw-r--r--shell/completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index 6c5c728f..b3d28f28 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -121,11 +121,11 @@ _fzf_handle_dynamic_completion() {
if [ -n "$orig" ] && type "$orig" > /dev/null 2>&1; then
$orig "$@"
elif [ -n "$_fzf_completion_loader" ]; then
- orig_complete=$(complete -p "$cmd")
+ orig_complete=$(complete -p "$cmd" 2> /dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
- if [ "$(complete -p "$cmd")" != "$orig_complete" ]; then
+ if [ "$(complete -p "$cmd" 2> /dev/null)" != "$orig_complete" ]; then
eval "$(complete | command grep " -F.* $orig_cmd$" | __fzf_orig_completion_filter)"
if [[ "$__fzf_nospace_commands" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"