ishell
ishell copied to clipboard
The command auto-completion will have problems when it hits a slash string
from ishell.command import Command
class SetTimezoneCommand(Command):
command_list = ['Africa/Dakar', 'Africa/Conakry']
def args(self):
return self.command_list
def run(self, line):
pass
linux@louis$ python myshell.py
>>>>>>>>>>>>>Hello<<<<<<<<<<
> set timezone Africa
The string behind the tab slash cannot be displayed, Is this a bug? Or is there another way to write this problem?
For sake of other users: ishell is using readline library to parse commands. Something along the lines
string = readline.get_completer_delims().replace('/', '')
readline.set_completer_delims(string)
Would resolve the issue