aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-22 16:25:35 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-22 16:25:35 +0200
commitf830ba4cf7b21b50406fbccf32535ebda11c2ed9 (patch)
tree6eca5864efd4737c64ee608f63daed5a4d8e608e
parenta84f1d6534515e3264b6e87d9f13568de98feade (diff)
downloadponysay-f830ba4cf7b21b50406fbccf32535ebda11c2ed9.tar.gz
ponysay-f830ba4cf7b21b50406fbccf32535ebda11c2ed9.tar.bz2
ponysay-f830ba4cf7b21b50406fbccf32535ebda11c2ed9.zip
misc
-rw-r--r--CHANGELOG3
-rw-r--r--completion/bash-completion.sh8
-rw-r--r--completion/fish-completion.fish5
-rw-r--r--completion/zsh-completion.zsh5
-rw-r--r--manuals/ponysay.texinfo66
-rwxr-xr-xponysay2
6 files changed, 79 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e5136e5..d893033 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,9 @@ Version 2.3
Pony symlink added: pinkieoink → oinkoinkoink
+ Support for non-MLP:FiM ponies (known as extraponies),
+ although the directory is currently empty.
+
Version 2.2
diff --git a/completion/bash-completion.sh b/completion/bash-completion.sh
index 72cafcb..62e1d40 100644
--- a/completion/bash-completion.sh
+++ b/completion/bash-completion.sh
@@ -5,13 +5,17 @@ _ponysay()
local cur prev words cword
_init_completion -n = || return
- options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon'
+ options='--version --help --list --altlist --pony --wrap --quote --balloonlist --balloon --file ++file ++pony ++list ++altlist'
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
- if [ $prev = "-f" ] || [ $prev = "--pony" ]; then
+ if [ $prev = "-f" ] || [ $prev = "--pony" ] || [ $prev = "--file" ]; then
ponies=$('/usr/bin/ponysay' --onelist)
COMPREPLY=( $( compgen -W "$ponies" -- "$cur" ) )
+ elif [ $prev = "-F" ] || [ $prev = "++pony" ] || [ $prev = "++file" ]; then
+ extraponies=$('/usr/bin/ponysay' ++onelist)
+ COMPREPLY=( $( compgen -W "$extraponies" -- "$cur" ) )
+
elif [ $prev = "-q" ] || [ $prev = "--quote" ]; then
quoters=$('/usr/bin/ponysay' --quoters)
COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) )
diff --git a/completion/fish-completion.fish b/completion/fish-completion.fish
index c211982..c29fff2 100644
--- a/completion/fish-completion.fish
+++ b/completion/fish-completion.fish
@@ -4,21 +4,26 @@
# Author: Elis Axelsson <etu AT elis DOT nu>
set -g ponies ('/usr/bin/ponysay' --onelist)
+set -g xponies ('/usr/bin/ponysay' ++onelist)
set -g quoters ('/usr/bin/ponysay' --quoters)
set -g balloons ('/usr/bin/ponysay' --balloonlist)
+## TODO: update with options [see info manual]: +l +L ++list ++altlist ++file --file ++pony
complete --command ponysay --short-option h --long-option help --description 'help of ponysay'
complete --command ponysay --short-option v --long-option version --description 'version of ponysay'
complete --command ponysay --short-option l --long-option list --description 'list pony names'
complete --command ponysay --short-option L --long-option altlist --description 'list pony names with alternatives'
complete --command ponysay --short-option B --long-option balloonlist --description 'list balloon style names'
complete --command ponysay --short-option f --long-option pony --arguments "$ponies" --description 'pony'
+complete --command ponysay --short-option F --arguments "$xponies" --description 'extra pony'
complete --command ponysay --short-option q --long-option quote --arguments "$quoters" --description 'pony'
complete --command ponysay --short-option b --long-option balloon --arguments "$balloons" --description 'balloon style'
complete --command ponysay --short-option W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped'
complete --command ponysay --arguments 'MESSAGE'
+
set -e ponies
+set -e xponies
set -e quoters
set -e balloons
diff --git a/completion/zsh-completion.zsh b/completion/zsh-completion.zsh
index c19604d..9d417ec 100644
--- a/completion/zsh-completion.zsh
+++ b/completion/zsh-completion.zsh
@@ -4,8 +4,11 @@ _shortopts=(
'-h[Show this help and exit]'
'-l[list pony names]'
'-L[list pony names with alternatives]'
+ '+l[list extra pony names]'
+ '+L[list extra pony names with alternatives]'
'-B[list balloon style names]'
- '-f[Select a pony (either a file name or a pony name]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"'
+ '-f[Select a pony (either a file name or a pony name)]: :_path_files -W '/usr/share/ponysay/ponies' -g "*(\:r)"'
+ '-F[Select a extra pony]: :_path_files -W '/usr/share/ponysay/extraponies' -g "*(\:r)"'
'-q[Select ponies for MLP:FiM quotes]'
'-b[Selecy a balloon style]'
'-W[The screen column where the message should be wrapped]'
diff --git a/manuals/ponysay.texinfo b/manuals/ponysay.texinfo
index 6689d5f..312a542 100644
--- a/manuals/ponysay.texinfo
+++ b/manuals/ponysay.texinfo
@@ -150,6 +150,15 @@ In versions earlier than version 2.0, the if the pony were a file name it had
to include a `@code{/}'. This is not longer required and any existing pony name
supersedes file names.
+@item -F
+@itemx ++file PONY
+@itemx ++pony PONY
+@cindex @command{-F}
+@cindex @command{++file}
+@cindex @command{++pony}
+Just as @command{-F}, but it uses extra (non-MLP:FiM) ponies instead of
+standard (MLP:FiM) ponies
+
@item -b STYLE
@itemx --bubble STYLE
@itemx --balloon STYLE
@@ -198,7 +207,7 @@ is installed the ponies which have quotes, i.e. can be used with the
(depending on the terminal.)
@item -L
-@itemx --linklist
+@itemx --altlist
@cindex @command{-L}
@cindex @command{--altlist}
Lists all installed ponies. If the extension @command{ponyquotes4ponysay}
@@ -208,6 +217,20 @@ is installed the ponies which have quotes, i.e. can be used with the
printing alternative names (symbolic links) inside brackets after their
target ponies.
+@item +l
+@itemx ++list
+@cindex @command{+l}
+@cindex @command{++list}
+Just as @command{-l}, but it lists extra (non-MLP:FiM) ponies instead of
+standard (MLP:FiM) ponies
+
+@item +L
+@itemx ++altlist
+@cindex @command{+L}
+@cindex @command{++altlist}
+Just as @command{-L}, but it lists extra (non-MLP:FiM) ponies instead of
+standard (MLP:FiM) ponies
+
@item -B
@itemx --balloonlist
@cindex @command{-B}
@@ -1058,14 +1081,19 @@ and only use Python 3, which as been accomplished in version 2.1.
@cindex auto-completion, inner workings
@cindex shell, auto-completion
@cindex @command{--onelist}
+@cindex @command{++onelist}
@cindex @command{--quoters}
To make it easier to write auto-completion for shells, @command{ponysay} supports
-the two options @command{--onelist} and @command{--quoters}, which has not short
-versions.
+the two options @command{--onelist}, @command{++onelist} and @command{--quoters},
+which has nt short versions.
-Executing @command{ponysay --onelist} will list every available pony,
-independent of where it is located, the output is a sorted and consists only
+Executing @command{ponysay --onelist} will list every available standard (MLP:FiM)
+pony, independent of where it is located, the output is a sorted and consists only
+of one pony per line.
+
+Executing @command{ponysay ++onelist} will list every available extra (non-MLP:FiM)
+pony, independent of where it is located, the output is a sorted and consists only
of one pony per line.
@command{ponysay --quoters} work just as @command{ponysay --onelist}, excepts
@@ -1172,13 +1200,20 @@ and as always regular files.)
@item
Support cowsay style message compression.
@item
-or @command{ponythink}
Pony symlink added:
@itemize @bullet
@item @code{pinkieoink} → @code{oinkoinkoink}
@end itemize
+@item
+Support for non-MLP:FiM ponies (known as extraponies), although the directory
+is currently empty.
+@c BEGIN the following is too descriptive for the plain/text change log
+This is implemented with the options @code{-F}, @code{+l}, and @code{+L}
+corresponding to @code{-f}, @code{-l}, and @code{-L}.
+@c END
@end itemize
+
@heading Version 2.2
@itemize @bullet
@@ -1194,10 +1229,12 @@ Support custom balloon styles using the option @code{-b}, @code{-B} will list
all available. This list depends on whether you are invoking @command{ponysay}
@end itemize
+
@heading Version 2.1.1
Nothing worth mention.
+
@heading Version 2.1
@itemize @bullet
@@ -1221,6 +1258,7 @@ minimum size of balloon.
@c END
@end itemize
+
@heading Version 2.0
@itemize @bullet
@@ -1232,12 +1270,14 @@ All Perl scripts and almost all Bash are reimplemented in one Python 3 script.
kmsponies4ponysay is included.
@end itemize
+
@heading Version 1.4.1
@itemize @bullet
@item
Code is repaired and more portable.
@end itemize
+
@heading Version 1.4
@itemize @bullet
@@ -1247,6 +1287,7 @@ Make file is improved.
@b{Note}: Identifies itself as version 1.3
+
@heading Version 1.3
@itemize @bullet
@@ -1263,6 +1304,7 @@ Pony symlink added:
the default value is @code{/usr}
@end itemize
+
@heading Version 1.2
@itemize @bullet
@@ -1290,6 +1332,7 @@ file names including spaces.)
@b{Note}: Identifies itself as version 1.1
+
@heading Version 1.1
@itemize @bullet
@@ -1338,6 +1381,7 @@ Support for extension: ponyquotes4ponysay.
Accepts arbitrary spaces in @command{-f} argument.
@end itemize
+
@heading Version 1.0
@itemize @bullet
@@ -1368,6 +1412,7 @@ Improved TTY support: ponies have low colours resolution, instead of monochrome,
when the high colour resolution is not available.
@end itemize
+
@heading Version 0.10
@itemize @bullet
@@ -1399,6 +1444,7 @@ Environment variables added: @code{PONYSAY_FULL_WIDTH}, @code{PONYSAY_SHELL_LINE
@code{PONYSAY_TRUNCATE_HEIGHT}, @code{PONYSAY_BOTTOM}.
@end itemize
+
@heading Version 0.9
@itemize @bullet
@@ -1418,6 +1464,7 @@ Support for TTY (Linux VT).
@code{sparkler}, @code{violet}.
@end itemize
+
@heading Version 0.8
@itemize @bullet
@@ -1447,6 +1494,7 @@ Support for TTY (Linux VT).
@b{Note}: Identifies itself as version 0.7
+
@heading Version 0.7
@itemize @bullet
@@ -1457,6 +1505,7 @@ Support for TTY (Linux VT).
Support for listing ponies with @command{-l} option.
@end itemize
+
@heading Version 0.6
@itemize @bullet
@@ -1469,6 +1518,7 @@ Dropping usage of utility @command{which}, using @command{hash} instead.
@b{Note}: Identifies itself as version 0.5
+
@heading Version 0.5
@itemize @bullet
@@ -1476,6 +1526,7 @@ Dropping usage of utility @command{which}, using @command{hash} instead.
Using utility @command{which} to determine existence of @command{cowsay}.
@end itemize
+
@heading Version 0.4
@itemize @bullet
@@ -1491,6 +1542,7 @@ Select random pony if not specified.
@command{-f} supports file names, and not only pony names.
@end itemize
+
@heading Version 0.3
@itemize @bullet
@@ -1498,6 +1550,7 @@ Select random pony if not specified.
Fixed use of @code{.pony} files.
@end itemize
+
@heading Version 0.2
@itemize @bullet
@@ -1512,6 +1565,7 @@ Pony files end with @code{.pony} instead of @code{.cow}.
@command{-h} prints proper help.
@end itemize
+
@heading Version 0.1
First release.
diff --git a/ponysay b/ponysay
index baea15c..67a7d2e 100755
--- a/ponysay
+++ b/ponysay
@@ -1675,7 +1675,7 @@ for balloondir in _balloondirs:
usage_saythink = '\033[34;1m(ponysay | ponythink)\033[21;39m'
usage_common = '[-c] [-W \033[4mCOLUMN\033[24m] [-b \033[4mSTYLE\033[24m]'
-usage_listhelp = '(-l | -L | -B | -v | -h)'
+usage_listhelp = '(-l | -L | -B | +l | +L | -v | -h)'
usage_file = '[(-f | -F) \033[4mPONY\033[24m]... ([--] \033[4mmessage\033[24m | <<<\033[4mmessage\033[24m)'
usage_quote = '-q [\033[4mPONY\033[24m...]'