Skip to content

Commit

Permalink
Ticket #3018: broken directory completion.
Browse files Browse the repository at this point in the history
In the command line, the subdirectory completion in current directory
isn't performed if stub isn't starting with './'.

Signed-off-by: Andrew Borodin <[email protected]>
  • Loading branch information
aborodin committed Nov 7, 2013
1 parent ed65223 commit 09f1818
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/widget/input_complete.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,12 +1350,19 @@ try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags)
matches = completion_matches (state.word, username_completion_function, state.flags);
}

/* And finally if this word is in a command position, then
/* If this word is in a command position, then
complete over possible command names, including aliases, functions,
and command names. */
if (matches == NULL)
matches = try_complete_all_possible (&state, text, lc_start);

/* And finally if nothing found, try complete directory name */
if (matches == NULL)
{
state.in_command_position = 0;
matches = try_complete_all_possible (&state, text, lc_start);
}

g_free (state.word);

if (matches != NULL &&
Expand Down

0 comments on commit 09f1818

Please sign in to comment.