fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
0df6fa791
master
1function __fish_complete_svn_diff --description'Complete "svn diff" arguments' 2set -l cmdl( commandline -cxp| string escape) 3set -l diff diff 4set -l args 5while set -q cmdl[ 1 ] 6switch $cmdl [ 1 ] 7case --diff-cmd 8if set -q cmdl[ 2 ] 9set diff$cmdl [ 2 ] 10set -e cmd[ 2 ] 11end 12 13case --extensions 14if set -q cmdl[ 2 ] 15set args$cmdl [ 2 ] 16set -e cmdl[ 2 ] 17end 18end 19set -e cmdl[ 1 ] 20end 21set -l token( commandline -cpt) 22complete -C" $diff $args $token " 23 24end 25 26function _svn_cmpl_ -d'Make a completion for a subcommand' --argument-names subcommand 27set -e argv[ 1 ] 28complete -c svn -n"__fish_seen_subcommand_from $subcommand " $argv 29end 30 31# 32# subcommands 33# 34set -l add add 35set -l blame'blame ann annotate praise' 36set -l cat cat 37set -l changelist'cl changelist' 38set -l checkout'co checkout' 39set -l cleanup cleanup 40set -l commit'ci commit' 41set -l copy'cp copy' 42set -l diff'di diff' 43set -l export export 44set -l help'\? h help' 45set -l import import 46set -l info info 47set -l list'ls list' 48set -l lock lock 49set -l log log 50set -l merge merge 51set -l mergeinfo mergeinfo 52set -l mkdir mkdir 53set -l move'mv move ren rename' 54set -l patch patch 55set -l propdel'pd pdel propdel' 56set -l propedit'pe pedit propedit' 57set -l propget'pg pget propget' 58set -l proplist'pl plist proplist' 59set -l propset'ps pset propset' 60set -l relocate relocate 61set -l remove'rm remove del delete' 62set -l resolve resolve 63set -l resolved resolved 64set -l revert revert 65set -l stat'st stat status' 66set -l switch'sw switch' 67set -l unlock unlock 68set -l update'up update' 69set -l upgrade upgrade 70 71complete -c svn -n __fish_use_subcommand -x -a$add -d'Put files under version control, scheduling them for addition in the next commit' 72complete -c svn -n __fish_use_subcommand -x -a$blame -d'Output the content of specified files or URLs with revision and author information in-line' 73complete -c svn -n __fish_use_subcommand -x -a$cat -d'Output the content of specified files or URLs' 74complete -c svn -n __fish_use_subcommand -x -a$changelist -d'Output the content of specified files or URLs with revision and author information in-line' 75complete -c svn -n __fish_use_subcommand -x -a$checkout -d'Check out a working copy from a repository' 76complete -c svn -n __fish_use_subcommand -x -a$cleanup -d'Recursively clean up the working copy, removing locks, resuming unfinished operations, etc' 77complete -c svn -n __fish_use_subcommand -x -a$commit -d'Send changes from your working copy to the repository' 78complete -c svn -n __fish_use_subcommand -x -a$copy -d'Duplicate something in working copy or repository, remembering history' 79complete -c svn -n __fish_use_subcommand -x -a$diff -d'Display the differences between two revisions or paths' 80complete -c svn -n __fish_use_subcommand -x -a$export -d'Create an unversioned copy of a tree' 81complete -c svn -n __fish_use_subcommand -x -a$help -d'Describe the usage of this program or its subcommands' 82complete -c svn -n __fish_use_subcommand -x -a$import -d'Commit an unversioned file or tree into the repository' 83complete -c svn -n __fish_use_subcommand -x -a$info -d'Display information about a local or remote item' 84complete -c svn -n __fish_use_subcommand -x -a$list -d'List directory entries in the repository' 85complete -c svn -n __fish_use_subcommand -x -a$lock -d'Lock working copy paths/URLs in the repo, so that no other user can commit changes to them' 86complete -c svn -n __fish_use_subcommand -x -a$log -d'Show the log messages for a set of revision(s) and/or file(s)' 87complete -c svn -n __fish_use_subcommand -x -a$merge -d'Apply the differences between two sources to a working copy path' 88complete -c svn -n __fish_use_subcommand -x -a$mergeinfo -d'Display information related to merges' 89complete -c svn -n __fish_use_subcommand -x -a$mkdir -d'Create a new directory under version control' 90complete -c svn -n __fish_use_subcommand -x -a$move -d'Move and/or rename something in working copy or repository' 91complete -c svn -n __fish_use_subcommand -x -a$patch -d'Apply a unidiff patch to the working copy' 92complete -c svn -n __fish_use_subcommand -x -a$propdel -d'Remove a property from files, dirs, or revisions' 93complete -c svn -n __fish_use_subcommand -x -a$propedit -d'Edit a property with an external editor' 94complete -c svn -n __fish_use_subcommand -x -a$propget -d'Print the value of a property on files, dirs, or revisions' 95complete -c svn -n __fish_use_subcommand -x -a$proplist -d'List all properties on files, dirs, or revisions' 96complete -c svn -n __fish_use_subcommand -x -a$propset -d'Set the value of a property on files, dirs, or revisions' 97complete -c svn -n __fish_use_subcommand -x -a$relocate -d'Rewrite working copy url metadata' 98complete -c svn -n __fish_use_subcommand -x -a$remove -d'Remove files and directories from version control' 99complete -c svn -n __fish_use_subcommand -x -a$resolve -d'Remove conflicts on working copy files or directories' 100complete -c svn -n __fish_use_subcommand -x -a$resolved -d'Remove \'conflicted\' state on working copy files or directories' 101complete -c svn -n __fish_use_subcommand -x -a$revert -d'Restore pristine working copy file (undo most local edits)' 102complete -c svn -n __fish_use_subcommand -x -a$stat -d'Print the status of working copy files and directories' 103complete -c svn -n __fish_use_subcommand -x -a$switch -d'Update the working copy to a different URL' 104complete -c svn -n __fish_use_subcommand -x -a$unlock -d'Unlock working copy paths or URLs' 105complete -c svn -n __fish_use_subcommand -x -a$update -d'Bring changes from the repository into the working copy' 106complete -c svn -n __fish_use_subcommand -x -a$upgrade -d'Upgrade the metadata storage format for a working copy' 107 108# 109# Global commands 110# 111complete -c svn -n'not __fish_use_subcommand' -l username -x -d'Specify a username ARG' 112complete -c svn -n'not __fish_use_subcommand' -l password -x -d'Specify a password ARG' 113complete -c svn -n'not __fish_use_subcommand' -l no-auth-cache -d'Do not cache authentication tokens' 114complete -c svn -n'not __fish_use_subcommand' -l non-interactive -d'Do no interactive prompting' 115complete -c svn -n'not __fish_use_subcommand' -l trust-server-cert -d'Accept SSL server certificates from unknown authorities (only with --non-interactive)' 116complete -c svn -n'not __fish_use_subcommand' -l config-dir -x -d'Read user configuration files from directory ARG' 117complete -c svn -n'not __fish_use_subcommand' -l config-option -x -d'Set user configuration option in the format: FILE:SECTION:OPTION=[VALUE]' 118 119# 120# local commands 121# 122for cmdin $commit $copy $import $lock $mkdir $move $propedit $remove 123if not test $cmd = lock 124_svn_cmpl_ $cmd -l editor-cmd -x -d'Use ARG as external editor' 125end 126_svn_cmpl_ $cmd -l message -s m -d'Specify log message' 127_svn_cmpl_ $cmd -l encoding -x -d'Treat value as being in charset encoding ARG' 128_svn_cmpl_ $cmd -l file -s F -d'Read log message from file' 129_svn_cmpl_ $cmd -l force-log -d'Force validity of log message source' 130end 131 132for cmdin $merge $resolve $switch $update 133_svn_cmpl_ $cmd -l accept -d'Specify automatic conflict resolution source' -xa'base working mine-conflict theirs-conflict mine-full theirs-full' 134end 135 136for cmdin $add $changelist $checkout $commit $diff $export $import $info $list $log $merge $mergeinfo $propdel $propget $proplist $propset $resolve $resolved $revert $stat $switch $update 137_svn_cmpl_ $cmd -l depth -d'Limit operation by depth' -xa'empty files immediates infinity' 138end 139 140for cmdin $add $changelist $checkout $commit $copy $delete $elog $export $import $merge $mkdir $move $patch $propdel $proplist $propset $resolve $resolved $revert $stat $switch $update $upgrade 141_svn_cmpl_ $cmd -l quiet -s q -d'Print nothing, or only summary information' 142end 143 144for cmdin $add $blame $checkout $delete $diff $export $import $lock $merge $move $propedit $propset $remove $switch $unlock $update 145_svn_cmpl_ $cmd -l force -d'Force operation to run' 146end 147 148for cmdin $add $changelist $commit $delete $info $lock $log $propset $resolve $resolved $revert $unlock 149_svn_cmpl_ $cmd -l targets -d'Process contents of file ARG as additional args' -r 150end 151 152for cmdin $changelist $commit $diff $info $propdel $propget $proplist $propset $revert $stat $update 153_svn_cmpl_ $cmd -l changelist -l cl -d'Operate only on members of changelist' -r 154end 155 156for cmdin $blame $diff $info $list $log $propget $proplist $stat 157_svn_cmpl_ $cmd -l xml -d'Output in xml' 158end 159 160for cmdin $commit $copy $delete $import $log $mkdir $move $propedit 161_svn_cmpl_ $cmd -l with-revprop -d'Retrieve revision property' -x 162end 163 164for cmdin $diff $log $merge 165_svn_cmpl_ $cmd -l change -s c -d'The change made in revision ARG' -xa'(__fish_print_svn_rev)' 166end 167 168for cmdin $blame $cat $checkout $copy $diff $export $info $list $log $merge $mergeinfo $move $propedit $propget $propdel $proplist $propset $switch $update 169_svn_cmpl_ $cmd -l revision -s r -d'Which revision the target is first looked up' -xa'(__fish_print_svn_rev)' 170end 171 172for cmdin $checkout $copy $export $relocate $stat $switch $update 173_svn_cmpl_ $cmd -l ignore-externals -d'Ignore externals definitions' 174end 175 176for cmdin $blame $list $log $propget $proplist $stat 177_svn_cmpl_ $cmd -l verbose -s v -d'Print extra information' 178end 179 180for cmdin $propdel $propedit $propget $proplist $propset 181_svn_cmpl_ $cmd -l revprop -d'Operate on a revision property (use with -r)' 182end 183 184for cmdin $add $copy $mkdir $move $update 185_svn_cmpl_ $cmd -l parents -d'Add intermediate parents' 186end 187 188for cmdin $blame $diff $log $merge 189_svn_cmpl_ $cmd -l extensions -s x -d'Output 3 lines of unified context' -xa'-u --unified' 190_svn_cmpl_ $cmd -l extensions -s x -d'Ignore changes in amount of whitespace' -xa'-b --ignore-space-change' 191_svn_cmpl_ $cmd -l extensions -s x -d'Ignore all whitespace' -xa'-w --ignore-all-space' 192_svn_cmpl_ $cmd -l extensions -s x -d'Ignore eol style' -xa'-w --ignore-eol-style' 193_svn_cmpl_ $cmd -l extensions -s x -d'Show C function name' -xa'-p --show-c-function' 194_svn_cmpl_ $cmd -l extensions -n'__fish_seen_subcommand_from --diff-cmd' -xa'(__fish_complete_svn_diff)' 195end 196 197for cmdin $cleanup $merge $switch $update 198_svn_cmpl_ $cmd -l diff3-cmd -d'Use as merge command' -xa"(complete -C '')" 199end 200 201for cmdin $blame $info $list $log $stat 202_svn_cmpl_ $cmd -l incremental -d'Give output suitable for concatenation' 203end 204 205for cmdin $add $import $stat 206_svn_cmpl_ $cmd -l no-ignore -d'Disregard default and svn:ignore property ignores' 207end 208 209for cmdin $merge $patch 210_svn_cmpl_ $cmd -l dry-run -d'Try operation but make no changes' 211end 212 213for cmdin $merge $switch 214_svn_cmpl_ $cmd -l ignore-ancestry -d'Ignore ancestry when calculating merges' 215end 216 217for cmdin $diff $log 218_svn_cmpl_ $cmd -l internal-diff -d'Override diff-cmd specified in config file' 219_svn_cmpl_ $cmd -l diff-cmd -d'Use external diff command' -xa"(complete -C '')" 220end 221 222for cmdin $add $import 223_svn_cmpl_ $cmd -l no-auto-props -d'Disable automatic properties' 224end 225 226for cmdin $switch $update 227_svn_cmpl_ $cmd -l set-depth -d'Set new working copy depth' -xa'exclude empty files immediates infinity' 228end 229 230for cmdin $blame $log 231_svn_cmpl_ $cmd -l use-merge-history -s g -d'Use/display additional information from merge history' 232end 233 234# 235# Individual commands 236# 237 238# 239# Completions for the 'checkout', 'co' subcommands 240# 241_svn_cmpl_ $checkout -xa'http:// ftp:// svn+ssh:// svn+ssh://(__fish_print_hostnames)' 242 243# 244# Completions for the 'changelist', 'cl' subcommands 245# 246_svn_cmpl_ $changelist -l remove -d'Remove changelist association' 247 248# 249# Completions for the 'commit', 'ci' subcommands 250# 251_svn_cmpl_ $commit -l keep-changelists -d'don\'t delete changelists after commit' 252_svn_cmpl_ $commit -l no-unlock -d'Don\'t unlock the targets' 253 254# 255# Completions for the 'remove', 'rm', 'delete', 'del' subcommands 256# 257_svn_cmpl_ $remove -l keep-local -x -d'Keep path in working copy' 258 259# 260# Completions for the 'diff', 'di' subcommands 261# 262_svn_cmpl_ $diff -l old -d'Use ARG as the older target' -xa'(__fish_print_svn_rev)' 263_svn_cmpl_ $diff -l new -d'Use ARG as the newer target' -xa'(__fish_print_svn_rev)' 264_svn_cmpl_ $diff -l no-diff-deleted -d'Do not print differences for deleted files' 265_svn_cmpl_ $diff -l notice-ancestry -d'Notice ancestry when calculating differences' 266_svn_cmpl_ $diff -l summarize -d'Show a summary of the results' 267_svn_cmpl_ $diff -l git -d'Use git\'s extended diff format' 268_svn_cmpl_ $diff -l show-copies-as-adds -d'Don\'t diff copied or moved files with their source' 269 270# 271# Completions for the 'export' subcommand 272# 273_svn_cmpl_ $export -l native-eol -x -d'Use a different EOL marker than the standard' 274 275# 276# Completions for the 'log' subcommand 277# 278_svn_cmpl_ $log -l stop-on-copy -d'Do not cross copies while traversing history' 279_svn_cmpl_ $log -l limit -s l -x -d'Maximum number of log entries' 280_svn_cmpl_ $log -l diff -d'Produce diff output' 281_svn_cmpl_ $log -l with-all-revprops -d'Retrieve all revision properties' 282_svn_cmpl_ $log -l with-no-revprops -d'Retrieve no revision properties' 283 284# 285# Completions for the 'merge' subcommand 286# 287_svn_cmpl_ $merge -l allow-mixed-variables -d'Allow merge into mixed-revision working copy' 288_svn_cmpl_ $merge -l record-only -d'Merge only mergeinfo differences' 289_svn_cmpl_ $merge -l reintegrate -d'Merge a branch back into its parent branch' 290 291# 292# Completions for the 'patch' subcommand 293# 294_svn_cmpl_ $patch -l reverse-diff -d'Apply the unidiff in reverse' 295_svn_cmpl_ $patch -l strip -x -d'Number of leading path components to strip from paths' 296 297# 298# Completions for the 'propget', 'pget', 'pg' subcommands 299# 300_svn_cmpl_ $propget -l strict -d'Use strict semantics' 301 302# 303# Complete pget, pset, pedit options with svn props 304# 305set -l props svn:{ ignore, keywords, executable, eol-style, mime-type, externals, need-lock} 306_svn_cmpl_ $propget -a" $props " 307_svn_cmpl_ $propedit -a" $props " 308_svn_cmpl_ $propdel -a" $props " 309_svn_cmpl_ $propset -a" $props " 310 311_svn_cmpl_ svn:eol-style -a"native LF CR CRLF" 312_svn_cmpl_ svn:mime-type -a"(__fish_print_xdg_mimetypes)" 313_svn_cmpl_ svn:keywords -a URL -d'The URL for the head version of the object' 314_svn_cmpl_ svn:keywords -a Author -d'The last person to modify the file' 315_svn_cmpl_ svn:keywords -a Date -d'Last changed date' 316_svn_cmpl_ svn:keywords -a Rev -d'The last revision the object changed' 317_svn_cmpl_ svn:keywords -a Id -d'A compressed summary of all keywords' 318 319# 320# Completions for the 'relocate' subcommand 321# 322_svn_cmpl_ $relocate -xa'( svn info | string match "*URL:*" | string split -f2 " ") http:// ftp:// svn+ssh:// svn+ssh://(__fish_print_hostnames)' 323 324# 325# Completions for the 'switch', 'sw' subcommands 326# 327_svn_cmpl_ $switch -l relocate -d'Relocate via URL-rewriting' -xa'( svn info | string match "*URL:*" | string split -f2 " ") http:// ftp:// svn+ssh:// svn+ssh://(__fish_print_hostnames)' 328 329# 330# Completions for the 'status', 'st' subcommands 331# 332_svn_cmpl_ $stat -l show-updates -s u -d'Display update information' 333 334# 335# Completions for the 'update', 'up' subcommand 336# 337_svn_cmpl_ $update -l editor-cmd -x -d'Use ARG as external editor' 338 339functions -e _svn_cmpl_