Don't complete files if no completion can be found

This essentially breaks the "--no-files" flag to `complete`.

Some commands simply do _not_ take files.

Fixes #112.
This commit is contained in:
Fabian Homborg 2017-05-05 02:54:49 +02:00
parent 6c4a51d56e
commit a3a069234b

View file

@ -1451,10 +1451,6 @@ void complete(const wcstring &cmd_with_subcmds, std::vector<completion_t> *out_c
}
}
// If we have found no command specific completions at all, fall back to using
// file completions.
if (completer.empty()) do_file = true;
// Hack. If we're cd, handle it specially (issue #1059, others).
handle_as_special_cd = (current_command_unescape == L"cd");