ishell icon indicating copy to clipboard operation
ishell copied to clipboard

The command auto-completion will have problems when it hits a slash string

Open LouisXXL opened this issue 3 years ago • 1 comments

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?

LouisXXL avatar Nov 27 '21 03:11 LouisXXL

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

checkmypi avatar Nov 21 '22 10:11 checkmypi