Fix to avoid suggesting files for empty tokens

This commit is contained in:
ridiculousfish 2012-12-26 15:28:25 -08:00
parent fde9842a8e
commit dd317709f8

View file

@ -1971,6 +1971,10 @@ void complete(const wcstring &cmd, std::vector<completion_t> &comps, complete_ty
if (commands_to_load != NULL && completer.has_commands_to_load())
do_file = false;
/* And if we're autosuggesting, and the token is empty, don't do file suggestions */
if (type == COMPLETE_AUTOSUGGEST && current_token_unescape.empty())
do_file = false;
/*
This function wants the unescaped string
*/