Permalink
Browse files

Fix to avoid suggesting files for empty tokens

  • Loading branch information...
1 parent fde9842 commit dd317709f8032bfc6074170b51614ad511dc19f8 @ridiculousfish ridiculousfish committed Dec 26, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 complete.cpp
View
@@ -1970,7 +1970,11 @@ void complete(const wcstring &cmd, std::vector<completion_t> &comps, complete_ty
See https://github.com/fish-shell/fish-shell/issues/378 */
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
*/

0 comments on commit dd31770

Please sign in to comment.