/usr/share/yash/completion/svn is in yash 2.35-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 | # (C) 2011-2012 magicant
# Completion script for the "svn" command.
# Supports Subversion 1.7.
function completion/svn {
typeset OPTIONS COMMONOPTIONS ADDOPTIONS ARGOPT PREFIX
COMMONOPTIONS=( #>#
"--config-dir:; specify a directory containing configuration files"
"--config-option:; specify a configuration option"
"h ? --help; print help"
"--no-auth-cache; don't cache user name and password"
"--non-interactive; disable interactive prompt"
"--password:; specify a password for authentication"
"--trust-server-cert; accept suspicious SSL server certificate"
"--username:; specify a user name for authentication"
) #<#
ADDOPTIONS=( #>#
"--accept:; specify an action for conflict resolution"
"--allow-mixed-revisions" # not documented as not recommended
"--auto-props; enable automatic property setting"
"c: --change:; specify a change (revision)"
"--changelist: --cl:; specify a changelist to operate on"
"--depth:; specify directory depth to operate on"
"--diff; show diff"
"--diff-cmd:; specify an external program to be used as \"diff\""
"--diff3-cmd:; specify an external program to be used as \"diff3\""
"--dry-run; don't make any actual changes"
"--editor-cmd:; specify an external program to be used as an editor"
"--encoding:; specify the encoding of the log message"
"x: --extensions:; specify arguments that is passed to the external diff command"
"F: --file:; use the specified file's contents instead of invoking an editor"
"--force; force operation to run"
"--force-log; accept a suspicious parameter value for log messages"
"--git; print in Git-like format"
"--ignore-ancestry; ignore ancestry when calculating differences"
"--ignore-externals; ignore externals and its working copies"
"--ignore-whitespace; tolerate whitespace mismatches"
"--incremental; print output in a format suitable for concatenation"
"--keep-changelists; don't delete changelists after committing"
"--keep-local; keep the local working copy"
"l: --limit:; specify the number of log messages to be shown"
"m: --message:; specify a log message"
"--native-eol:; specify an end-of-line marker for native EOL settings"
"--new:; specify the newer one of the compared files"
"--no-auto-props; disable automatic property setting"
"--no-diff-deleted; don't print diff for deleted files"
"--no-ignore; don't ignore files"
"--no-unlock; don't unlock files after committing"
#deprecated "N --non-recursive"
"--notice-ancestry; take ancestry into account when making a diff"
"--old:; specify the older one of the compared files"
"--parents; create nonexistent parent directories"
"q --quiet; print essential information only"
"--record-only; update mergeinfo without actually merging files"
"R --recursive; operate on subdirectories recursively"
"--reintegrate; merge a branch into the trunk"
"--relocate; change the location of the repository"
"--remove; remove files from a changelist"
"--reverse-diff; patch in reverse"
"r: --revision:; specify a revision or a revision range"
"--revprop; operate on a revision property rather than a file property"
"--set-depth:; specify a new sticky depth of working directories"
"--show-copies-as-adds; treat copied files as newly added"
"--show-revs:; specify the type of mergeinfo to print"
"--show-updates; show which files will be updated by \"svn update\""
"--stop-on-copy; operate on revisions after the file was copied last"
"--strict; output the raw value without pretty-formatting"
"--strip:; specify the number of pathname components to strip from file names"
"--summarize; print a summary of changes only"
"--targets:; specify a file containing target paths"
"g --use-merge-history; use mergeinfo to show history before merges"
"v --verbose; print additional info"
"--version"
"--with-all-revprops; include all revision properties"
"--with-no-revprops; include no revision properties"
"--with-revprop:; specify a revision property to set or print"
"--xml; print in the XML format"
) #<#
OPTIONS=("$COMMONOPTIONS" "$ADDOPTIONS")
command -f completion//parseoptions -es
# find subcommand name
typeset SUBCMD= separatorindex=2
while [ $separatorindex -lt ${WORDS[#]} ]; do
case ${WORDS[separatorindex]} in (--)
SUBCMD=${WORDS[separatorindex+1]}
break
esac
separatorindex=$((separatorindex+1))
done
# normalize subcommand name
case $SUBCMD in
(praise|annotate|ann)
SUBCMD=blame;;
(cl)
SUBCMD=changelist;;
(co)
SUBCMD=checkout;;
(ci)
SUBCMD=commit;;
(cp)
SUBCMD=copy;;
(del|remove|rm)
SUBCMD=delete;;
(di)
SUBCMD=diff;;
(h|\?)
SUBCMD=help;;
(ls)
SUBCMD=list;;
(mv|rename|ren)
SUBCMD=move;;
(pdel|pd)
SUBCMD=propdel;;
(pedit|pe)
SUBCMD=propedit;;
(pget|pg)
SUBCMD=propget;;
(plist|pl)
SUBCMD=proplist;;
(pset|ps)
SUBCMD=propset;;
(stat|st)
SUBCMD=status;;
(sw)
SUBCMD=switch;;
(up)
SUBCMD=update;;
esac
case $ARGOPT in
(-)
OPTIONS=("$COMMONOPTIONS")
if command -vf "completion/svn::$SUBCMD:opt" >/dev/null 2>&1; then
command -f "completion/svn::$SUBCMD:opt"
fi
command -f completion//completeoptions
;;
(--accept) #>>#
complete -P "$PREFIX" -D "discard all local and remote changes" base
complete -P "$PREFIX" -D "discard all remote changes" mine-full
complete -P "$PREFIX" -D "resolve conflicts by discarding remote changes" mine-conflict
complete -P "$PREFIX" -D "discard all local changes" theirs-full
complete -P "$PREFIX" -D "resolve conflicts by discarding local changes" theirs-conflict
complete -P "$PREFIX" -D "mark the current working copy as resolved" working
case $SUBCMD in
(resolve)
;;
(*)
complete -P "$PREFIX" -D "launch an editor to merge by hand" edit
complete -P "$PREFIX" -D "launch a predefined external program" launch
complete -P "$PREFIX" -D "leave the conflict unresolved" postpone
;;
esac
;; #<<#
# (c|--change)
# ;;
(--changelist|--cl)
command -f completion/svn::completechangelist
;;
(--config-dir)
complete -P "$PREFIX" -S / -T -d
;;
(--config-option)
#TODO
;;
(--depth|--set-depth) #>>#
complete -P "$PREFIX" -D "only the target itself" empty
complete -P "$PREFIX" -D "the target and non-directory immediate children" files
complete -P "$PREFIX" -D "the target and immediate children" immediates
complete -P "$PREFIX" -D "the target and all of its descendants" infinity
#<<#
case $ARGOPT in (--set-depth) #>>#
complete -P "$PREFIX" -D "exclude the target from the parent" exclude
esac #<<#
;;
(--encoding)
#TODO
;;
(x|--extensions)
WORDS=(diff)
command -f completion//reexecute
;;
(F|--file)
complete -P "$PREFIX" -f
;;
# (l|--limit)
# ;;
# (m|--message)
# ;;
# (--password)
# ;;
(--native-eol) #>>#
complete -P "$PREFIX" LF CR CRLF
;; #<<#
(--new|--old)
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
;;
(r|--revision)
typeset word="${TARGETWORD#"$PREFIX"}"
PREFIX="${TARGETWORD%"${word#*:}"}"
#>>#
complete -P "$PREFIX" -D "the latest revision in the repository" HEAD
complete -P "$PREFIX" -D "the revision you checked out" BASE
complete -P "$PREFIX" -D "the latest revision in which a change was made" COMMITTED
complete -P "$PREFIX" -D "the revision immediately before COMMITTED" PREV
;; #<<#
(--show-revs) #>>#
complete -P "$PREFIX" -D "info about merges already performed" merged
complete -P "$PREFIX" -D "info about possible merges that can be performed" eligible
;; #<<#
(--target)
complete -P "$PREFIX" -f
;;
(--username)
complete -P "$PREFIX" -u
;;
(--with-revprop)
#TODO
;;
(--*-cmd)
WORDS=()
command -f completion//reexecute -e
;;
('')
if [ $separatorindex -eq ${WORDS[#]} ] ||
command -f completion/svn::containshelp; then
command -f completion/svn::completesubcmd
else
if command -vf "completion/svn::$SUBCMD:arg" >/dev/null 2>&1; then
command -f "completion/svn::$SUBCMD:arg"
fi
fi
;;
esac
}
function completion/svn::containshelp {
typeset opt
for opt in "${WORDS[2,separatorindex-1]}"; do
case $opt in (--help|-[h\?])
return 0
esac
done
return 1
}
function completion/svn::setoptions {
typeset opt i=1
for opt in "$ADDOPTIONS"; do
if [ $# -le 0 ]; then
break
fi
case " ${{opt%%;*}//:} " in (*" --$1 "*)
OPTIONS=("$OPTIONS" "$opt")
shift
esac
done
}
function completion/svn::completesubcmd {
complete -P "$PREFIX" -D "add files for versioning" add
complete -P "$PREFIX" -D "show files with author and revision info" blame praise annotate
complete -P "$PREFIX" -D "print the contents of files" cat
complete -P "$PREFIX" -D "put files into a changelist" changelist cl
complete -P "$PREFIX" -D "check out a working copy from a repository" checkout co
complete -P "$PREFIX" -D "resolve file locks and unfinished operations" cleanup
complete -P "$PREFIX" -D "make a new revision in the repository" commit ci
complete -P "$PREFIX" -D "copy a file" copy cp
complete -P "$PREFIX" -D "delete files" delete remove rm
complete -P "$PREFIX" -D "print differences between two files or revisions" diff
complete -P "$PREFIX" -D "make a copy of the versioned directory tree" export
complete -P "$PREFIX" -D "print usage of subcommands" help
complete -P "$PREFIX" -D "commit new files into the repository" import
complete -P "$PREFIX" -D "print info about versioned files" info
complete -P "$PREFIX" -D "print a list of versioned files" list ls
complete -P "$PREFIX" -D "lock files in the repository" lock
complete -P "$PREFIX" -D "print commit log messages" log
complete -P "$PREFIX" -D "apply changes between two files or revisions" merge
complete -P "$PREFIX" -D "print info about merge" mergeinfo
complete -P "$PREFIX" -D "make directories" mkdir
complete -P "$PREFIX" -D "move files" move mv
complete -P "$PREFIX" -D "apply a patch" patch
complete -P "$PREFIX" -D "delete a property of files" propdel pdel
complete -P "$PREFIX" -D "edit a property of files" propedit pedit
complete -P "$PREFIX" -D "print a property of files" propget pget
complete -P "$PREFIX" -D "print properties of files" proplist plist
complete -P "$PREFIX" -D "set a property of files" propset pset
complete -P "$PREFIX" -D "change the repository root URL" relocate
complete -P "$PREFIX" -D "resolve conflicts" resolve
# deprecated: complete -P "$PREFIX" -D "" resolved
complete -P "$PREFIX" -D "undo local edits" revert
complete -P "$PREFIX" -D "print the status of working copy" status
complete -P "$PREFIX" -D "update working copy to a different URL" switch
complete -P "$PREFIX" -D "unlock files in the repository" unlock
complete -P "$PREFIX" -D "update the working copy" update
complete -P "$PREFIX" -D "upgrade the working copy format" upgrade
}
function completion/svn::completeurl {
typeset OPTIND=1 opt dironly=false
while getopts d opt; do
case $opt in
(d) dironly=true;;
esac
done
typeset target="${TARGETWORD#"$PREFIX"}"
case $target in
(?*://* | ^/*) ;;
(*) return ;;
esac
typeset targetdir="$(dirname -- "$target"X)"
typeset file prefix="${TARGETWORD%"${TARGETWORD##*/}"}"
while read -r file; do
case $file in
(*/)
complete -P "$prefix" -T -- "$file"
;;
(*)
if ! $dironly; then
complete -P "$prefix" -- "$file"
fi
;;
esac
done <(svn --non-interactive ls -- "${targetdir}/" 2>/dev/null)
}
function completion/svn::completelocal {
typeset OPTIND=1 opt clean= modified= unversioned=
while getopts cmu opt; do
case $opt in
(c) clean=true;;
(m) modified=true;;
(u) unversioned=true;;
esac
done
complete -P "$PREFIX" -S / -T -d
case "$clean-$modified-$unversioned" in
(true-true-true)
complete -P "$PREFIX" -f
return
;;
(--)
return
;;
esac
typeset target="${TARGETWORD#"$PREFIX"}"
typeset targetdir="$(dirname -- "$target"X)"
if ! command -f completion/svn::isworkingdir "$targetdir"; then
if [ "$unversioned" ]; then
complete -P "$PREFIX" -f
fi
return
fi
typeset path prefix opt
while read -r path; do
if [ "$path" -ef "$targetdir" ]; then
continue
fi
case $target in
(*/*) prefix="$PREFIX${target%/*}/" ;;
(*) prefix="$PREFIX" ;;
esac
complete -P "$prefix" -- "${path##*/}"
done 2>/dev/null <(
if [ "$unversioned" ]; then
svn st --depth=files --no-ignore -- "$targetdir" |
grep '^[?I]' |
cut -c 9-
fi
if [ "$clean$modified" ]; then
case $clean-$modified in
(true-true) regex='^[^?I]';;
(true- ) regex='^ ';;
( -true) regex='^[^ ?I]|^.[^ ]';;
esac
svn st -v --depth=files -- "$targetdir" |
grep -E "$regex" |
cut -c 10- |
while read -r _ _ _ file; do
printf '%s\n' "$file"
done
fi
)
# XXX should honor the dotglob option
}
function completion/svn::completepropname { #>>#
complete -P "$PREFIX" -D "make the file executable" svn:executable
complete -P "$PREFIX" -D "specify the file's MIME type" svn:mime-type
complete -P "$PREFIX" -D "specify unversioned filenames not listed in status" svn:ignore
complete -P "$PREFIX" -D "specify keywords substituted in file" svn:keywords
complete -P "$PREFIX" -D "specify how end-of-line markers are manipulated" svn:eol-style
complete -P "$PREFIX" -D "specify external paths and repositories" svn:externals
complete -P "$PREFIX" -D "indicate that the file is not a regular file" svn:special
complete -P "$PREFIX" -D "disable editing without lock" svn:needs-lock
complete -P "$PREFIX" -D "info about merge" svn:mergeinfo
} #<<#
function completion/svn::completechangelist {
typeset changelist
while read -r changelist; do
changelist=${changelist%\':}
changelist=${changelist##*\'}
complete -P "$PREFIX" "$changelist"
done 2>/dev/null <(svn status | grep "^--- .*'.*':\$")
}
function completion/svn::isworkingdir (
cd -P -- "$1" 2>/dev/null &&
until [ -d .svn ]; do
if [ . -ef .. ] || [ . -ef / ]; then
return 1
fi
cd -P ..
done
)
function completion/svn:::opt {
command -f completion/svn::setoptions version
}
function completion/svn::add:opt {
command -f completion/svn::setoptions \
auto-props depth force no-auto-props no-ignore parents quiet \
targets
}
function completion/svn::add:arg {
command -f completion/svn::completelocal -u
}
function completion/svn::blame:opt {
command -f completion/svn::setoptions \
extensions force incremental revision use-merge-history \
verbose xml
}
function completion/svn::blame:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::cat:opt {
command -f completion/svn::setoptions revision
}
function completion/svn::cat:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::changelist:opt {
command -f completion/svn::setoptions \
changelist depth quiet recursive remove targets
}
function completion/svn::changelist:arg {
typeset i=2 remove=false
while [ $i -lt $separatorindex ]; do
case ${WORDS[i]} in
(--remove) remove=true;;
esac
i=$((i+1))
done
if ! $remove && [ $(($separatorindex+1)) -eq ${WORDS[#]} ]; then
command -f completion/svn::completechangelist
else
command -f completion/svn::completelocal -cm
fi
}
function completion/svn::checkout:opt {
command -f completion/svn::setoptions \
depth force ignore-externals quiet revision
}
function completion/svn::checkout:arg {
command -f completion/svn::completeurl
if [ $(($separatorindex+1)) -lt ${WORDS[#]} ]; then
complete -P "$PREFIX" -f
fi
}
function completion/svn::cleanup:opt {
command -f completion/svn::setoptions diff3-cmd
}
function completion/svn::cleanup:arg {
complete -P "$PREFIX" -S / -T -d
}
function completion/svn::commit:opt {
command -f completion/svn::setoptions \
changelist depth editor-cmd encoding file force-log \
kee-changelists message no-unlock quiet targets with-revprop
}
function completion/svn::commit:arg {
command -f completion/svn::completelocal -m
}
function completion/svn::copy:opt {
command -f completion/svn::setoptions \
editor-cmd encoding file force-log ignore-externals message \
parents quiet revision with-revprop
}
function completion/svn::copy:arg {
command -f completion/svn::completelocal -cmu
command -f completion/svn::completeurl
}
function completion/svn::delete:opt {
command -f completion/svn::setoptions \
editor-cmd encoding file force force-log keep-local \
message quiet targets with-revprop
}
function completion/svn::delete:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::diff:opt {
command -f completion/svn::setoptions \
change changelist depth diff-cmd extensions force git new \
no-diff-deleted notice-ancestry old revision \
show-copies-as-adds summarize xml
}
function completion/svn::diff:arg {
# XXX should be relative to the argument of --old=...
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::export:opt {
command -f completion/svn::setoptions \
depth force ignore-externals native-eol quiet revision
}
function completion/svn::export:arg {
case $((${WORDS[#]} - $separatorindex)) in
(1)
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
;;
(2)
complete -P "$PREFIX" -f
;;
esac
}
function completion/svn::help:opt {
}
function completion/svn::help:arg {
command -f completion/svn::completesubcmd
}
function completion/svn::import:opt {
command -f completion/svn::setoptions \
auto-props depth editor-cmd encoding file force force-log \
message no-auto-props no-ignore quiet with-revprop
}
function completion/svn::import:arg {
case $((${WORDS[#]} - $separatorindex)) in
(1)
command -f completion/svn::completelocal -u
;;
(2)
command -f completion/svn::completeurl
;;
esac
}
function completion/svn::info:opt {
command -f completion/svn::setoptions \
changelist depth incremental recursive revision targets xml
}
function completion/svn::info:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::list:opt {
command -f completion/svn::setoptions \
depth incremental recursive revision verbose xml
}
function completion/svn::list:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::lock:opt {
command -f completion/svn::setoptions \
encoding file force force-log message targets
}
function completion/svn::lock:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::log:opt {
command -f completion/svn::setoptions \
change incremental limit quiet revision stop-on-copy targets \
use-merge-history verbose with-all-revprops with-no-revprops \
with-revprop xml
}
function completion/svn::log:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::merge:opt {
command -f completion/svn::setoptions \
accept allow-mixed-revisions change depth diff3-cmd dry-run \
extensions force ignore-ancestry quiet record-only reintegrate \
revision
}
function completion/svn::merge:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::mergeinfo:opt {
command -f completion/svn::setoptions revision show-revs
}
function completion/svn::mergeinfo:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::mkdir:opt {
command -f completion/svn::setoptions editor-cmd encoding file \
force-log message parents quiet with-revprop
}
function completion/svn::mkdir:arg {
complete -P "$PREFIX" -S / -T -d
command -f completion/svn::completeurl -d
}
function completion/svn::move:opt {
command -f completion/svn::setoptions editor-cmd encoding file force \
force-log message parents quiet revision with-revprop
}
function completion/svn::move:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::patch:opt {
command -f completion/svn::setoptions \
dry-run ignore-whitespace quiet reverse-diff strip
}
function completion/svn::patch:arg {
if [ $(($separatorindex+1)) -eq ${WORDS[#]} ]; then
complete -P "$PREFIX" -f
else
complete -P "$PREFIX" -S / -T -d
fi
}
function completion/svn::propdel:opt {
command -f completion/svn::setoptions \
changelist depth quiet recursive revision revprop
}
function completion/svn::propdel:arg {
if [ $(($separatorindex+1)) -eq ${WORDS[#]} ]; then
command -f completion/svn::completepropname
else
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
fi
}
function completion/svn::propedit:opt {
command -f completion/svn::setoptions editor-cmd encoding file force \
force-log message revision revprop with-revprop
}
function completion/svn::propedit:arg {
if [ $(($separatorindex+1)) -eq ${WORDS[#]} ]; then
command -f completion/svn::completepropname
else
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
fi
}
function completion/svn::propget:opt {
command -f completion/svn::setoptions \
changelist depth recursive revision revprop strict verbose xml
}
function completion/svn::propget:arg {
if [ $(($separatorindex+1)) -eq ${WORDS[#]} ]; then
command -f completion/svn::completepropname
else
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
fi
}
function completion/svn::proplist:opt {
command -f completion/svn::setoptions \
changelist depth quiet recursive revision revprop verbose xml
}
function completion/svn::proplist:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::propset:opt {
command -f completion/svn::setoptions changelist depth encoding file \
force quiet recursive revision revprop targets
}
function completion/svn::propset:arg {
typeset i=2 hasfile=false
while [ $i -lt $separatorindex ]; do
case ${WORDS[i]} in
(--file=*|-F*) hasfile=true;;
esac
i=$((i+1))
done
if [ $(($separatorindex+1)) -eq ${WORDS[#]} ]; then
command -f completion/svn::completepropname
elif ! $hasfile && [ $(($separatorindex+2)) -eq ${WORDS[#]} ]; then
# there is no completion for a property value
else
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
fi
}
function completion/svn::relocate:opt {
command -f completion/svn::setoptions ignore-externals
}
function completion/svn::relocate:arg {
command -f completion/svn::switch:arg "$@"
}
function completion/svn::resolve:opt {
command -f completion/svn::setoptions \
accept depth quiet recursive targets
}
function completion/svn::resolve:arg {
command -f completion/svn::completelocal -cm
}
function completion/svn::resolved:opt {
command -f completion/svn::setoptions \
depth quiet recursive targets
}
function completion/svn::resolved:arg {
command -f completion/svn::completelocal -cm
}
function completion/svn::revert:opt {
command -f completion/svn::setoptions \
changelist depth quiet recursive targets
}
function completion/svn::revert:arg {
command -f completion/svn::completelocal -m
}
function completion/svn::status:opt {
command -f completion/svn::setoptions \
changelist depth ignore-externals incremental no-ignore quiet \
show-updates verbose xml
}
function completion/svn::status:arg {
command -f completion/svn::completelocal -cm
}
function completion/svn::switch:opt {
command -f completion/svn::setoptions \
accept depth diff3-cmd force ignore-externals ignore-ancestry \
quiet relocate revision set-depth
}
function completion/svn::switch:arg {
if [ $(($separatorindex+1)) -lt ${WORDS[#]} ]; then
complete -P "$PREFIX" -S / -T -d
fi
command -f completion/svn::completeurl
}
function completion/svn::unlock:opt {
command -f completion/svn::setoptions force targets
}
function completion/svn::unlock:arg {
command -f completion/svn::completelocal -cm
command -f completion/svn::completeurl
}
function completion/svn::update:opt {
command -f completion/svn::setoptions \
accept changelist depth diff3-cmd editor-cmd force \
ignore-externals parents quiet revision set-depth
}
function completion/svn::update:arg {
command -f completion/svn::completelocal -cm
}
function completion/svn::upgrade:opt {
command -f completion/svn::setoptions quiet
}
function completion/svn::upgrade:arg {
complete -P "$PREFIX" -S / -T -d
}
# vim: set ft=sh ts=8 sts=8 sw=8 noet:
|