-i, +i and -r autocompletion and argparsing listing

This commit is contained in:
Mattias Andrée 2012-11-02 12:38:58 +01:00
parent 2135cc9daa
commit 1a561a63de
2 changed files with 17 additions and 6 deletions

View file

@ -16,6 +16,9 @@
((options -X --256-colours --256colours --x-colours) (desc 'Use xterm colours'))
((options -V --tty-colours --ttycolours --vt-colours) (desc 'Use linux vt colours'))
((options -K --kms-colours --kmscolours) (desc 'Utilise kms support'))
((options -i --info) (complete --info) (desc 'Print pony metadata'))
((options +i ++info) (complete ++info) (desc 'Print pony metadata as a message'))
)
(multiple argumented
@ -30,6 +33,8 @@
((options --colour-msg --colour-message) (arg ANSI-COLOUR) (files -0) (desc 'Specify colour of the message'))
((options --colour-pony) (arg ANSI-COLOUR) (files -0) (desc 'Specify colour of the pony (if uncoloured)'))
((options --colour-wrap --colour-hyphen) (arg ANSI-COLOUR) (files -0) (desc 'Specify addition colour of wrapping hyphen'))
((options -r --restrict) (complete --restrict) (arg RESTRICTION) (suggest -r) (files -0) (desc 'Restrict randomly selected ponies'))
)
(variadic (options --f --files --ponies) (bind -f) (desc 'Specify the ponies that may be printed'))
@ -56,5 +61,7 @@
) - 10
)
)
(suggestion -r (verbatim kind=KIND group=GROUP coat=COAT eye=EYE mane=MANE aura=AURA)
)
)

View file

@ -2650,12 +2650,16 @@ run `man ponysay`. Ponysay has so much more to offer than described here.''')
opts.add_argumentless(['-V', '--tty-colours', '--ttycolours', '--vt-colours'])
opts.add_argumentless(['-K', '--kms-colours', '--kmscolours'])
opts.add_argumented(['+c', '--colour'], arg = 'COLOUR')
opts.add_argumented(['--colour-bubble', '--colour-balloon'], arg = 'COLOUR')
opts.add_argumented(['--colour-link'], arg = 'COLOUR')
opts.add_argumented(['--colour-msg', '--colour-message'], arg = 'COLOUR')
opts.add_argumented(['--colour-pony'], arg = 'COLOUR')
opts.add_argumented(['--colour-wrap', '--colour-hyphen'], arg = 'COLOUR')
opts.add_argumentless(['-i', '--info'])
opts.add_argumentless(['+i', '++info'])
opts.add_argumented( ['-r', '--restrict'], arg = 'RESTRICTION')
opts.add_argumented( ['+c', '--colour'], arg = 'COLOUR')
opts.add_argumented( ['--colour-bubble', '--colour-balloon'], arg = 'COLOUR')
opts.add_argumented( ['--colour-link'], arg = 'COLOUR')
opts.add_argumented( ['--colour-msg', '--colour-message'], arg = 'COLOUR')
opts.add_argumented( ['--colour-pony'], arg = 'COLOUR')
opts.add_argumented( ['--colour-wrap', '--colour-hyphen'], arg = 'COLOUR')
opts.add_argumentless(['-h', '--help'], help = 'Print this help message.')
opts.add_argumentless(['-v', '--version'], help = 'Print the version of the program.')