diff options
-rw-r--r-- | ranger/gui/widgets/console.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index 29e8f1c5..b3e49c47 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -389,10 +389,14 @@ class OpenConsole(ConsoleWithTab): def _get_tab(self): # for now, just add " %s" - result = self.line - if result and result[-1] != ' ': - result += ' ' - return result + '%s ' + if ' ' in self.line: + result = self.line + if result and result[-1] != ' ': + result += ' ' + return result + '%s ' + else: + return (program + ' ' for program in self.fm.executables \ + if program.startswith(self.line)) def _substitute_metachars(self, command): dct = {} |