From a3a069234b92e86e204d58fbc7d3ddaebafe2cc7 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 5 May 2017 02:54:49 +0200 Subject: [PATCH] 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. --- src/complete.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/complete.cpp b/src/complete.cpp index f0c546323..8aaceec91 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -1451,10 +1451,6 @@ void complete(const wcstring &cmd_with_subcmds, std::vector *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");