Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LouisXXL opened this issue Nov 27, 2021 · 1 comment

Comments

@LouisXXL
Copy link

LouisXXL commented Nov 27, 2021

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?

@checkmypi
Copy link

checkmypi commented Nov 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants