mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Allow partial option matches in C CLI parser as well
Matches behavior of Go parser and is nice to have
This commit is contained in:
@@ -106,13 +106,14 @@ version
|
||||
t('-01=y', bool_reset=False, bool_set=True)
|
||||
t('-01=n', bool_reset=False, bool_set=False)
|
||||
t('--simple-string xx moo -1', leftover=['moo', '-1'], simple_string='xx')
|
||||
t('--simple-string -0 -- -1', leftover=['-1'], simple_string='-0')
|
||||
t('--si -0 -- -1', leftover=['-1'], simple_string='-0')
|
||||
t('--simple-string=-0 -- -1', leftover=['-1'], simple_string='-0')
|
||||
t('--simple-string=--help -- -1', leftover=['-1'], simple_string='--help')
|
||||
t('--simple-string --help -- -1', leftover=['-1'], simple_string='--help')
|
||||
t('-1l=a --list=b -c b --list c', bool_set=True, choice='b', list=list('abc'))
|
||||
t('-1s= -l "" --list= x', leftover=['x'], bool_set=True, simple_string='', list=['', ''])
|
||||
t('--choice moo', fails='a, b, c')
|
||||
t('--bool', fails='mbiguous')
|
||||
t('-1c moo', fails='a, b, c')
|
||||
t('-10c=moo', fails='a, b, c')
|
||||
t('-1 -h', fails=True, help_called=True)
|
||||
|
||||
Reference in New Issue
Block a user