From af71317774eaa20c45ad5e4d7f163b164dca9ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Tue, 23 Apr 2013 08:50:31 +0200 Subject: [PATCH] add ++quotes and --Quoters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- manuals/ponysay.texinfo | 14 +++++++++++--- src/__main__.py | 2 ++ src/ponysay.py | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/manuals/ponysay.texinfo b/manuals/ponysay.texinfo index 064f6080..488fdb95 100644 --- a/manuals/ponysay.texinfo +++ b/manuals/ponysay.texinfo @@ -2571,12 +2571,15 @@ use Python 3, which as been accomplished in version 2.1. @opindex @option{++onelist} @opindex @option{--Onelist} @opindex @option{--quoters} +@opindex @option{++quoters} +@opindex @option{--Quoters} @pindex @command{auto-auto-complete} To make it easier to write auto-completion for shells, @command{ponysay} supports -the options @option{--onelist}, @option{++onelist}, @option{--Onelist} and -@option{--quoters}, which has no short versions. To make it even easier we use -@command{auto-auto-complete} (@url{https://www.github.com/maandree/auto-auto-complete}) +the options @option{--onelist}, @option{++onelist}, @option{--Onelist}, +@option{--quoters} @option{++quoters} and @option{--Quoters}, which has no short +versions. To make it even easier we use @command{auto-auto-complete} +(@url{https://www.github.com/maandree/auto-auto-complete}) to generate auto-completion scripts, currently it supports @command{bash}, @command{fish} and @command{zsh}, the built system uses that program to generate completion for each shell. @@ -2597,6 +2600,11 @@ consists only of one pony per line. it limits the ponies to those that have quotes. Ponies that have quotes, but does not exist, i.e. does not have a .pony-file, are not listed. +@command{ponysay ++quoters} is to @command{ponysay --quoters} as +@command{ponysay ++onelist} is to @command{ponysay --onelist} and +@command{ponysay --Quoters} is to @command{ponysay --quoters} as +@command{ponysay --Onelist} is to @command{ponysay --onelist}. + Auto-completion scripts should not suggest these options. diff --git a/src/__main__.py b/src/__main__.py index ef682345..75d4c681 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -98,6 +98,8 @@ documentation run `info ponysay`, or for just a little more help than this run `man ponysay`. Ponysay has so much more to offer than described here.''') opts.add_argumentless(['--quoters']) + opts.add_argumentless(['++quoters']) + opts.add_argumentless(['--Quoters']) opts.add_argumentless(['--onelist']) opts.add_argumentless(['++onelist']) opts.add_argumentless(['--Onelist']) diff --git a/src/ponysay.py b/src/ponysay.py index 9abb81e2..75782824 100755 --- a/src/ponysay.py +++ b/src/ponysay.py @@ -291,7 +291,9 @@ class Ponysay(): ## Run modes if test('-h'): args.help() elif test('-v'): self.version() + elif test('--Quoters', ('--quoters', '++quoters')): self.quoters(True, True) elif test('--quoters'): self.quoters(True, False) + elif test('++quoters'): self.quoters(False, True) elif test('--Onelist', ('--onelist', '++onelist')): self.onelist(True, True) elif test('--onelist'): self.onelist(True, False) elif test('++onelist'): self.onelist(False, True)