You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
oh-my-fish/plugins/gi/gi.load

19 lines
391 B
Fish

# gitignore.io cli for fish
function gi
set -l params (echo $argv|tr ' ' ',')
curl -s http://www.gitignore.io/api/$params
end
# enable the complation by invoking `gi list`
if not set -q -g gi_list
ping -t 2 -c 1 -q gitignore.io >/dev/null
set gi_available $status
if test $gi_available
set -g gi_list (gi list| tr ',' ' ' ^/dev/null)
end
end
complete -c gi -a "$gi_list"