From b15e8123ca1d98d26fcd0a600b3ab19e02defd9f Mon Sep 17 00:00:00 2001 From: axel Date: Sun, 27 Aug 2006 10:57:40 +1000 Subject: [PATCH] =?UTF-8?q?If=20no=20completions=20have=20been=20found,=20?= =?UTF-8?q?use=20file=20completion=20even=20if=20command=20specific=20comp?= =?UTF-8?q?letions=20have=20disabled=20file=20completions.=20Suggested=20b?= =?UTF-8?q?y=20MArtin=20B=C3=A4hr.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20060827005740-ac50b-41c3bf2bb91bcfc0122c317bcc2aca2061cd019e.gz --- complete.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/complete.c b/complete.c index 482597d86..a631eac2a 100644 --- a/complete.c +++ b/complete.c @@ -2137,6 +2137,14 @@ void complete( const wchar_t *cmd, int do_file; do_file = complete_param( current_command, prev_token, current_token, comp ); + + /* + If we have found no command specific completions at + all, fall back to using file completions. + */ + if( !al_get_count( comp ) ) + do_file = 1; + complete_param_expand( current_token, comp, do_file ); } }