Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ishell/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def complete(self, line, buf, state, run=False, full_line=None):
candidates = self.get_candidates(next_command)
if candidates and len(candidates) > 1 and buf:
logger.debug("More than one candidate, not walking in %s" % buf)
return self._next_command(state, buf)
if next_command in candidates:
cmd = candidates.pop(next_command)
return cmd.complete(line[1:], buf, state, run, full_line)
else:
return self._next_command(state, buf)
elif candidates and next_command in candidates:
logger.debug("Found %s in childs, walking." % next_command)
cmd = candidates.pop(next_command)
Expand Down