mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 20:38:00 +01:00
misc
This commit is contained in:
parent
a84f1d6534
commit
f830ba4cf7
6 changed files with 79 additions and 10 deletions
|
@ -15,6 +15,9 @@ Version 2.3
|
||||||
|
|
||||||
Pony symlink added: pinkieoink → oinkoinkoink
|
Pony symlink added: pinkieoink → oinkoinkoink
|
||||||
|
|
||||||
|
Support for non-MLP:FiM ponies (known as extraponies),
|
||||||
|
although the directory is currently empty.
|
||||||
|
|
||||||
|
|
||||||
Version 2.2
|
Version 2.2
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,17 @@ _ponysay()
|
||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion -n = || return
|
_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" ) )
|
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||||
|
|
||||||
if [ $prev = "-f" ] || [ $prev = "--pony" ]; then
|
if [ $prev = "-f" ] || [ $prev = "--pony" ] || [ $prev = "--file" ]; then
|
||||||
ponies=$('/usr/bin/ponysay' --onelist)
|
ponies=$('/usr/bin/ponysay' --onelist)
|
||||||
COMPREPLY=( $( compgen -W "$ponies" -- "$cur" ) )
|
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
|
elif [ $prev = "-q" ] || [ $prev = "--quote" ]; then
|
||||||
quoters=$('/usr/bin/ponysay' --quoters)
|
quoters=$('/usr/bin/ponysay' --quoters)
|
||||||
COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$quoters" -- "$cur" ) )
|
||||||
|
|
|
@ -4,21 +4,26 @@
|
||||||
# Author: Elis Axelsson <etu AT elis DOT nu>
|
# Author: Elis Axelsson <etu AT elis DOT nu>
|
||||||
|
|
||||||
set -g ponies ('/usr/bin/ponysay' --onelist)
|
set -g ponies ('/usr/bin/ponysay' --onelist)
|
||||||
|
set -g xponies ('/usr/bin/ponysay' ++onelist)
|
||||||
set -g quoters ('/usr/bin/ponysay' --quoters)
|
set -g quoters ('/usr/bin/ponysay' --quoters)
|
||||||
set -g balloons ('/usr/bin/ponysay' --balloonlist)
|
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 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 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 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 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 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 --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 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 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 --short-option W --long-option wrap --arguments 'Integer' --description 'specify the column when the message should be wrapped'
|
||||||
complete --command ponysay --arguments 'MESSAGE'
|
complete --command ponysay --arguments 'MESSAGE'
|
||||||
|
|
||||||
|
|
||||||
set -e ponies
|
set -e ponies
|
||||||
|
set -e xponies
|
||||||
set -e quoters
|
set -e quoters
|
||||||
set -e balloons
|
set -e balloons
|
||||||
|
|
|
@ -4,8 +4,11 @@ _shortopts=(
|
||||||
'-h[Show this help and exit]'
|
'-h[Show this help and exit]'
|
||||||
'-l[list pony names]'
|
'-l[list pony names]'
|
||||||
'-L[list pony names with alternatives]'
|
'-L[list pony names with alternatives]'
|
||||||
|
'+l[list extra pony names]'
|
||||||
|
'+L[list extra pony names with alternatives]'
|
||||||
'-B[list balloon style names]'
|
'-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]'
|
'-q[Select ponies for MLP:FiM quotes]'
|
||||||
'-b[Selecy a balloon style]'
|
'-b[Selecy a balloon style]'
|
||||||
'-W[The screen column where the message should be wrapped]'
|
'-W[The screen column where the message should be wrapped]'
|
||||||
|
|
|
@ -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
|
to include a `@code{/}'. This is not longer required and any existing pony name
|
||||||
supersedes file names.
|
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
|
@item -b STYLE
|
||||||
@itemx --bubble STYLE
|
@itemx --bubble STYLE
|
||||||
@itemx --balloon 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.)
|
(depending on the terminal.)
|
||||||
|
|
||||||
@item -L
|
@item -L
|
||||||
@itemx --linklist
|
@itemx --altlist
|
||||||
@cindex @command{-L}
|
@cindex @command{-L}
|
||||||
@cindex @command{--altlist}
|
@cindex @command{--altlist}
|
||||||
Lists all installed ponies. If the extension @command{ponyquotes4ponysay}
|
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
|
printing alternative names (symbolic links) inside brackets after their
|
||||||
target ponies.
|
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
|
@item -B
|
||||||
@itemx --balloonlist
|
@itemx --balloonlist
|
||||||
@cindex @command{-B}
|
@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 auto-completion, inner workings
|
||||||
@cindex shell, auto-completion
|
@cindex shell, auto-completion
|
||||||
@cindex @command{--onelist}
|
@cindex @command{--onelist}
|
||||||
|
@cindex @command{++onelist}
|
||||||
@cindex @command{--quoters}
|
@cindex @command{--quoters}
|
||||||
|
|
||||||
To make it easier to write auto-completion for shells, @command{ponysay} supports
|
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
|
the two options @command{--onelist}, @command{++onelist} and @command{--quoters},
|
||||||
versions.
|
which has nt short versions.
|
||||||
|
|
||||||
Executing @command{ponysay --onelist} will list every available pony,
|
Executing @command{ponysay --onelist} will list every available standard (MLP:FiM)
|
||||||
independent of where it is located, the output is a sorted and consists only
|
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.
|
of one pony per line.
|
||||||
|
|
||||||
@command{ponysay --quoters} work just as @command{ponysay --onelist}, excepts
|
@command{ponysay --quoters} work just as @command{ponysay --onelist}, excepts
|
||||||
|
@ -1172,13 +1200,20 @@ and as always regular files.)
|
||||||
@item
|
@item
|
||||||
Support cowsay style message compression.
|
Support cowsay style message compression.
|
||||||
@item
|
@item
|
||||||
or @command{ponythink}
|
|
||||||
Pony symlink added:
|
Pony symlink added:
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item @code{pinkieoink} → @code{oinkoinkoink}
|
@item @code{pinkieoink} → @code{oinkoinkoink}
|
||||||
@end itemize
|
@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
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 2.2
|
@heading Version 2.2
|
||||||
|
|
||||||
@itemize @bullet
|
@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}
|
all available. This list depends on whether you are invoking @command{ponysay}
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 2.1.1
|
@heading Version 2.1.1
|
||||||
|
|
||||||
Nothing worth mention.
|
Nothing worth mention.
|
||||||
|
|
||||||
|
|
||||||
@heading Version 2.1
|
@heading Version 2.1
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1221,6 +1258,7 @@ minimum size of balloon.
|
||||||
@c END
|
@c END
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 2.0
|
@heading Version 2.0
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1232,12 +1270,14 @@ All Perl scripts and almost all Bash are reimplemented in one Python 3 script.
|
||||||
kmsponies4ponysay is included.
|
kmsponies4ponysay is included.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 1.4.1
|
@heading Version 1.4.1
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
Code is repaired and more portable.
|
Code is repaired and more portable.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 1.4
|
@heading Version 1.4
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1247,6 +1287,7 @@ Make file is improved.
|
||||||
|
|
||||||
@b{Note}: Identifies itself as version 1.3
|
@b{Note}: Identifies itself as version 1.3
|
||||||
|
|
||||||
|
|
||||||
@heading Version 1.3
|
@heading Version 1.3
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1263,6 +1304,7 @@ Pony symlink added:
|
||||||
the default value is @code{/usr}
|
the default value is @code{/usr}
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 1.2
|
@heading Version 1.2
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1290,6 +1332,7 @@ file names including spaces.)
|
||||||
|
|
||||||
@b{Note}: Identifies itself as version 1.1
|
@b{Note}: Identifies itself as version 1.1
|
||||||
|
|
||||||
|
|
||||||
@heading Version 1.1
|
@heading Version 1.1
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1338,6 +1381,7 @@ Support for extension: ponyquotes4ponysay.
|
||||||
Accepts arbitrary spaces in @command{-f} argument.
|
Accepts arbitrary spaces in @command{-f} argument.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 1.0
|
@heading Version 1.0
|
||||||
|
|
||||||
@itemize @bullet
|
@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.
|
when the high colour resolution is not available.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.10
|
@heading Version 0.10
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1399,6 +1444,7 @@ Environment variables added: @code{PONYSAY_FULL_WIDTH}, @code{PONYSAY_SHELL_LINE
|
||||||
@code{PONYSAY_TRUNCATE_HEIGHT}, @code{PONYSAY_BOTTOM}.
|
@code{PONYSAY_TRUNCATE_HEIGHT}, @code{PONYSAY_BOTTOM}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.9
|
@heading Version 0.9
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1418,6 +1464,7 @@ Support for TTY (Linux VT).
|
||||||
@code{sparkler}, @code{violet}.
|
@code{sparkler}, @code{violet}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.8
|
@heading Version 0.8
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1447,6 +1494,7 @@ Support for TTY (Linux VT).
|
||||||
|
|
||||||
@b{Note}: Identifies itself as version 0.7
|
@b{Note}: Identifies itself as version 0.7
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.7
|
@heading Version 0.7
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1457,6 +1505,7 @@ Support for TTY (Linux VT).
|
||||||
Support for listing ponies with @command{-l} option.
|
Support for listing ponies with @command{-l} option.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.6
|
@heading Version 0.6
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1469,6 +1518,7 @@ Dropping usage of utility @command{which}, using @command{hash} instead.
|
||||||
|
|
||||||
@b{Note}: Identifies itself as version 0.5
|
@b{Note}: Identifies itself as version 0.5
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.5
|
@heading Version 0.5
|
||||||
|
|
||||||
@itemize @bullet
|
@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}.
|
Using utility @command{which} to determine existence of @command{cowsay}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.4
|
@heading Version 0.4
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1491,6 +1542,7 @@ Select random pony if not specified.
|
||||||
@command{-f} supports file names, and not only pony names.
|
@command{-f} supports file names, and not only pony names.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.3
|
@heading Version 0.3
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1498,6 +1550,7 @@ Select random pony if not specified.
|
||||||
Fixed use of @code{.pony} files.
|
Fixed use of @code{.pony} files.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.2
|
@heading Version 0.2
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@ -1512,6 +1565,7 @@ Pony files end with @code{.pony} instead of @code{.cow}.
|
||||||
@command{-h} prints proper help.
|
@command{-h} prints proper help.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
|
||||||
@heading Version 0.1
|
@heading Version 0.1
|
||||||
|
|
||||||
First release.
|
First release.
|
||||||
|
|
2
ponysay
2
ponysay
|
@ -1675,7 +1675,7 @@ for balloondir in _balloondirs:
|
||||||
|
|
||||||
usage_saythink = '\033[34;1m(ponysay | ponythink)\033[21;39m'
|
usage_saythink = '\033[34;1m(ponysay | ponythink)\033[21;39m'
|
||||||
usage_common = '[-c] [-W \033[4mCOLUMN\033[24m] [-b \033[4mSTYLE\033[24m]'
|
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_file = '[(-f | -F) \033[4mPONY\033[24m]... ([--] \033[4mmessage\033[24m | <<<\033[4mmessage\033[24m)'
|
||||||
usage_quote = '-q [\033[4mPONY\033[24m...]'
|
usage_quote = '-q [\033[4mPONY\033[24m...]'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue