Do _filedir in _command_offset only for commands with no completions installed.

If we have a completion installed for the actual command invoked via
sudo etc, it is very much possible and fine that no completions are
returned from it, and doing _filedir in these cases is not the right
thing to do.
This commit is contained in:
Ville Skyttä 2011-01-02 23:49:58 +02:00
parent 24a37fc840
commit d37b36605e

View File

@ -1527,10 +1527,10 @@ _command_offset()
cspec=${cspec%%${cmd##*/}};
COMPREPLY=( $( eval compgen "$cspec" -- "$cur" ) );
fi
elif [ ${#COMPREPLY[@]} -eq 0 ]; then
_filedir
fi
fi
[ ${#COMPREPLY[@]} -eq 0 ] && _filedir
}
complete -F _command aoss command do else eval exec ltrace nice nohup padsp \
then time tsocks vsound xargs