pmb.helpers.cli: fix TAB-completion of items with '-' (MR 1960)
Before this fix tab completion of names with hyphens were not done: try for example to complete UI package name in 'pmbootstrap init' with hyphen, like "plasma-mobile" / "plasma-desktop". Now this is handled correctly (hyphen is not considered as delimeter).
This commit is contained in:
parent
44e099acc7
commit
aa88721b75
|
@ -54,6 +54,10 @@ def ask(args, question="Continue?", choices=["y", "n"], default="n",
|
|||
|
||||
if complete:
|
||||
readline.parse_and_bind('tab: complete')
|
||||
delims = readline.get_completer_delims()
|
||||
if '-' in delims:
|
||||
delims = delims.replace('-', '')
|
||||
readline.set_completer_delims(delims)
|
||||
readline.set_completer(ReadlineTabCompleter(complete).completer_func)
|
||||
|
||||
ret = input(question_full + ": ")
|
||||
|
|
Loading…
Reference in New Issue