Skip to content

Commit

Permalink
Add fish completions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jvortmann committed Aug 19, 2014
1 parent f0d8a9f commit 939f4f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions completions/basher.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function __fish_basher_needs_command
set cmd (commandline -opc)
if [ (count $cmd) -eq 1 -a $cmd[1] = 'basher' ]
return 0
end
return 1
end

function __fish_basher_using_command
set cmd (commandline -opc)
if [ (count $cmd) -gt 1 ]
if [ $argv[1] = $cmd[2] ]
return 0
end
end
return 1
end

complete -f -c basher -n '__fish_basher_needs_command' -a '(basher commands)'
for cmd in (basher commands)
complete -f -c basher -n "__fish_basher_using_command $cmd" -a "(basher completions $cmd)"
end

0 comments on commit 939f4f4

Please sign in to comment.