Move __fish_complete_svn_diff into the completion script

This commit is contained in:
Jason 2019-12-03 17:29:06 +09:00 committed by Fabian Homborg
parent 965b142acd
commit a361cde1df
11 changed files with 27 additions and 67 deletions

View file

@ -67198,11 +67198,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "Saloppe Einhäng-Optionen tolerieren" msgstr "Saloppe Einhäng-Optionen tolerieren"
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
#, fuzzy
msgid "Complete \"svn diff\" arguments"
msgstr "Anzahl der Argumente zählen"
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy #, fuzzy
msgid "Print list host-names with user@" msgid "Print list host-names with user@"

View file

@ -66549,10 +66549,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "Complete using path" msgstr "Complete using path"
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
msgid "Complete \"svn diff\" arguments"
msgstr "Complete “svn diff” arguments"
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy #, fuzzy
msgid "Print list host-names with user@" msgid "Print list host-names with user@"

View file

@ -65525,10 +65525,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "Compléter en utilisant les fichiers" msgstr "Compléter en utilisant les fichiers"
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy #, fuzzy
msgid "Print list host-names with user@" msgid "Print list host-names with user@"

View file

@ -61987,10 +61987,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "" msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@" msgid "Print list host-names with user@"
msgstr "" msgstr ""

View file

@ -61987,10 +61987,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "" msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@" msgid "Print list host-names with user@"
msgstr "" msgstr ""

View file

@ -62576,10 +62576,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "" msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@" msgid "Print list host-names with user@"
msgstr "" msgstr ""

View file

@ -67668,11 +67668,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "Tolerate sloppy mount options" msgstr "Tolerate sloppy mount options"
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
#, fuzzy
msgid "Complete \"svn diff\" arguments"
msgstr "Count the number of arguments"
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
#, fuzzy #, fuzzy
msgid "Print list host-names with user@" msgid "Print list host-names with user@"

View file

@ -61991,10 +61991,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "" msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
msgid "Complete \"svn diff\" arguments"
msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@" msgid "Print list host-names with user@"
msgstr "" msgstr ""

View file

@ -62536,11 +62536,6 @@ msgstr ""
msgid "Complete using files" msgid "Complete using files"
msgstr "" msgstr ""
#: /tmp/fish/implicit/share/functions/__fish_complete_svn_diff.fish:1
#, fuzzy
msgid "Complete \"svn diff\" arguments"
msgstr "参数的个数的计数"
#: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1 #: /tmp/fish/implicit/share/functions/__fish_complete_user_at_hosts.fish:1
msgid "Print list host-names with user@" msgid "Print list host-names with user@"
msgstr "" msgstr ""

View file

@ -1,3 +1,29 @@
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
function _svn_cmpl_ -d 'Make a completion for a subcommand' --no-scope-shadowing --argument-names subcommand function _svn_cmpl_ -d 'Make a completion for a subcommand' --no-scope-shadowing --argument-names subcommand
set -e argv[1] set -e argv[1]
complete -c svn -n "__fish_seen_subcommand_from $subcommand" $argv complete -c svn -n "__fish_seen_subcommand_from $subcommand" $argv
@ -166,9 +192,7 @@ for cmd in $blame $diff $log $merge
_svn_cmpl_ $cmd -l extensions -s x -d 'Ignore all whitespace' -xa '-w --ignore-all-space' _svn_cmpl_ $cmd -l extensions -s x -d 'Ignore all whitespace' -xa '-w --ignore-all-space'
_svn_cmpl_ $cmd -l extensions -s x -d 'Ignore eol style' -xa '-w --ignore-eol-style' _svn_cmpl_ $cmd -l extensions -s x -d 'Ignore eol style' -xa '-w --ignore-eol-style'
_svn_cmpl_ $cmd -l extensions -s x -d 'Show C function name' -xa '-p --show-c-function' _svn_cmpl_ $cmd -l extensions -s x -d 'Show C function name' -xa '-p --show-c-function'
_svn_cmpl_ $cmd -l extensions -n '__fish_seen_subcommand_from --diff-cmd' -xa '(__fish_complete_svn_diff)'
# Next completion doesn't work, since fish doesn't respect -x key
#_svn_cmpl_ $cmd -l extensions -n '__fish_seen_subcommand_from --diff-cmd' -xa '(__fish_complete_svn_diff)'
end end
for cmd in $cleanup $merge $switch $update for cmd in $cleanup $merge $switch $update

View file

@ -1,25 +0,0 @@
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