fish-shell/share/functions/__fish_complete_svn_diff.fish
Kurtis Rader 11a60c8374 reformat all fish scripts
I hate doing this but I am tired of touching a fish script as part of
some change and having `make style` radically change it. Which makes
editing fish scripts more painful than it needs to be. It is time to do
a wholesale reformatting of these scripts to conform to the documented
style as implemented by the `fish_indent` program.
2016-11-27 21:27:22 -08:00

25 lines
696 B
Fish

function __fish_complete_svn_diff --description 'Complete "svn diff" arguments'
set -l cmdl (commandline -cop)
#set -l cmdl svn diff --diff-cmd diff --extensions '-a -b'
set -l diff diff
set -l args
while set -q cmdl[1]
switch $cmdl[1]
case --diff-cmd
if set -q cmdl[2]
set diff $cmdl[2]
set -e cmd[2]
end
case --extensions
if set -q cmdl[2]
set args $cmdl[2]
set -e cmdl[2]
end
end
set -e cmdl[1]
end
set -l token (commandline -cpt)
complete -C"$diff $args $token"
end