mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 12:27:59 +01:00
enable --F and --f without argument, this way you can get any random extrapony by ending the commmand line with just --F
This commit is contained in:
parent
96abf11f46
commit
13308a6880
2 changed files with 5 additions and 2 deletions
|
@ -216,6 +216,9 @@ Variadic variant of @option{-F}, meaning that all arguments added after this one
|
|||
will parsed as an argument to this option. Additionally, those options are added
|
||||
to @option{-F}.
|
||||
|
||||
An important feature of this options, is that you can but it in the end of the
|
||||
command line, without any argument to get a random non-MLP:FiM pony.
|
||||
|
||||
@item --q [PONY...]
|
||||
@itemx --quotes [PONY...]
|
||||
@opindex @option{--q}
|
||||
|
|
|
@ -319,13 +319,13 @@ class Ponysay():
|
|||
ponies[pony] = ponydir + ponyfile
|
||||
|
||||
## Support for explicit pony file names
|
||||
if not names == None:
|
||||
if names is not None:
|
||||
for name in names:
|
||||
if os.path.exists(name):
|
||||
ponies[name] = name
|
||||
|
||||
## If there is not select ponies, choose all of them
|
||||
if names == None:
|
||||
if (names is None) or (len(names) == 0):
|
||||
names = list(ponies.keys())
|
||||
|
||||
## Select a random pony of the choosen onles
|
||||
|
|
Loading…
Reference in a new issue