mirror of
https://github.com/erkin/ponysay.git
synced 2025-01-31 02:16:43 +01:00
Added completions for the fish and fishfish(a fork of fish) shell
This commit is contained in:
parent
49135c1430
commit
bae75d95b6
3 changed files with 52 additions and 0 deletions
4
Makefile
4
Makefile
|
@ -35,6 +35,10 @@ install: all
|
|||
install "ponysaylist.pl" "$(DESTDIR)/usr/bin/ponysaylist.pl"
|
||||
ln -sf "ponysay" "$(DESTDIR)/usr/bin/ponythink"
|
||||
|
||||
mkdir -p "$(DESTDIR)/usr/share/fish/completions/"
|
||||
install -m "644" "completion/fish_ponysay.fish" "$(DESTDIR)/usr/share/fish/completions/ponysay.fish"
|
||||
install -m "644" "completion/fish_ponythink.fish" "$(DESTDIR)/usr/share/fish/completions/ponythink.fish"
|
||||
|
||||
mkdir -p "$(DESTDIR)/usr/share/zsh/site-functions/"
|
||||
install "completion/zsh-completion.zsh" "$(DESTDIR)/usr/share/zsh/site-functions/_ponysay"
|
||||
|
||||
|
|
24
completion/fish_ponysay.fish
Normal file
24
completion/fish_ponysay.fish
Normal file
|
@ -0,0 +1,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 /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 ~/.local/share/ponysay/ponies/ | sed 's/\.pony/\t Pony from ~\/.local\/share\/ponysay\/ponies\//')
|
||||
end
|
||||
|
||||
complete -c ponysay -s h --description "Help of ponysay"
|
||||
complete -c ponysay -s v --description "Version of ponysay"
|
||||
complete -c ponysay -s l --description "List pony files"
|
||||
complete -c ponysay -s f -a "$systemponies $homeponies" --description "Select a pony, either a filename or pony name"
|
||||
complete -c ponysay -s W -a "Integer" --description "The screen column where the message should be wrapped"
|
||||
|
||||
set -e systemponies
|
||||
set -e homeponies
|
||||
|
24
completion/fish_ponythink.fish
Normal file
24
completion/fish_ponythink.fish
Normal file
|
@ -0,0 +1,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 /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 ~/.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
|
||||
|
Loading…
Reference in a new issue