From ba3c477b4144943ceb1bd07cf316828e9e742a4d Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 20 Jan 2010 01:01:29 +0100 Subject: console: slightly improved tab completion for CommandConsole --- ranger/gui/widgets/console.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index 5c888da5..6562276f 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -386,7 +386,10 @@ class OpenConsole(ConsoleWithTab): def _get_tab(self): # for now, just add " %s" - return self.line + ' %s' + result = self.line + if result and result[-1] != ' ': + result += ' ' + return result + '%s ' def _substitute_metachars(self, command): dct = {} -- cgit 1.4.1-2-gfad0