aboutsummaryrefslogtreecommitdiff
path: root/completion/fish_ponythink.fish
blob: 24391ce8dfe13dcfc1d7c79e6492cc5037d4693b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Completions for ponysay & ponythink
# https://github.com/erkin/ponysay/
#
# Author: Elis Axelsson <etu AT elis DOT nu>


if test -d /usr/share/ponysay/ponies/
	set -g systemponies (ls --color=no /usr/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from \/usr\/share\/ponysay\/ponies\//')
end

if test -d ~/.local/share/ponysay/ponies/
	set -g homeponies (ls --color=no ~/.local/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from ~\/.local\/share\/ponysay\/ponies\//')
end

complete -c ponythink -s h --description "Help of ponythink"
complete -c ponythink -s v --description "Version of ponythink"
complete -c ponythink -s l --description "List pony files"
complete -c ponythink -s f -a "$systemponies $homeponies" --description "Select a pony, either a filename or pony name"
complete -c ponythink -s W -a "Integer" --description "The screen column where the message should be wrapped"

set -e systemponies
set -e homeponies