2006-02-10 00:43:14 +00:00
|
|
|
#
|
|
|
|
# Completions for the svn VCS command
|
|
|
|
#
|
|
|
|
|
|
|
|
function __fish_svn_subcommand_allowed
|
|
|
|
set -l svncommands add blame cat checkout cleanup commit copy delete diff di help import info list lock log merge mkdir move propdel propedit propget proplist resolved revert status switch unlock update
|
|
|
|
set -l -- cmd (commandline -poc)
|
|
|
|
set -e cmd[1]
|
|
|
|
for i in $cmd
|
|
|
|
if contains -- $i $svncommands
|
|
|
|
return 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return 0
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# If no subcommand has been specified, complete using all available subcommands
|
|
|
|
#
|
|
|
|
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'add\t"'(_ "Place files or directories under version control")'"'
|
2006-02-12 22:19:18 +00:00
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'blame\t"'(_ "Output files/URLs with revision and author information inline")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'cat\t"'(_ "Output content of files/URLs")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'checkout\t"'(_ "Check out a working copy from the repository")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'cleanup\t"'(_ "Recursively clean up the working copy")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'commit\t"'(_ "Send changes from your working copy to the repository")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'import\t"'(_ "Commit an unversioned file or tree into the repository")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'info\t"'(_ "Display information about a local or remote item")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'list\t"'(_ "List directory entries in the repository")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'lock\t"'(_ "Lock working copy paths or URLs in the repository")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'log\t"'(_ "Show the log messages for a set of revision(s) and/or file(s)")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'merge\t"'(_ "Apply the differences between two sources to a working copy path")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'mkdir\t"'(_ "Create a new directory under version control")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'move\t"'(_ "Move and/or rename something in working copy or repository")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'propdel\t"'(_ "Remove a property from files, dirs, or revisions")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'propedit\t"'(_ "Edit a property with an external editor on targets")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'propget\t"'(_ "Print value of a property on files, dirs, or revisions")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'proplist\t"'(_ "List all properties on files, dirs, or revisions")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'resolved\t"'(_ "Remove conflicted state on working copy files or directories")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'revert\t"'(_ "Restore pristine working copy file")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'status\t"'(_ "Print the status of working copy files and directories")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'switch\t"'(_ "Update the working copy to a different URL")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'unlock\t"'(_ "Unlock working copy paths or URLs")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'update\t"'(_ "Bring changes from the repository into the working copy")'"'
|
|
|
|
complete -c svn -n '__fish_svn_subcommand_allowed' -xa 'help\t"'(_ "Describe the usage of this program or its subcommands")'"'
|
2006-02-10 00:43:14 +00:00
|
|
|
|
|
|
|
# -s/--revision
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from blame cat checkout info list log merge move propdel propedit propget proplist switch update' -x -s r -l revision -d (N_ "Specify revision")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --targets
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add commit import info lock log resolved revert unlock' -r -l targets -d (N_ "Pass contents of file as additional args")
|
2006-02-10 00:43:14 +00:00
|
|
|
# -N/--non-recursive
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add checkout commit import merge status switch update' -s N -l non-recursive -d (N_ "Don't recurse")
|
2006-02-10 00:43:14 +00:00
|
|
|
# -q/--quiet
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add checkout commit import log merge mkdir move propdel proplist resolved revert status switch update help' -s q -l quiet -d (N_ "Print as little as possible")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --force
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add lock merge move propedit unlock' -l force -d (N_ "Force operation to run")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --auto-props
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add' -l auto-props -d (N_ "Enable automatic properties")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --no-auto-props
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add' -l no-auto-props -d (N_ "Disable automatic properties")
|
2006-02-10 00:43:14 +00:00
|
|
|
# -v/--verbose
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from blame cat log proplist status' -s v -l verbose -d (N_ "Print extra info")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --username
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from blame cat checkout commit import info list lock log merge mkdir move propdel propedit propget proplist status switch unlock update' -x -l username -d (N_ "Specify a username")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --password
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from blame cat checkout commit import info list lock log merge mkdir move propdel propedit propget proplist status switch unlock update' -x -l password -d (N_ "Specify a password")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --no-auth-cache
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from blame cat checkout commit import info list lock log merge mkdir move propdel propedit propget proplist status switch unlock update' -l no-auth-cache -d (N_ "Don't cache auth tokens")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --non-interactive
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from blame cat checkout commit import info list lock log merge mkdir move propdel propedit propget proplist status switch unlock update' -l non-interactive -d (N_ "Do no interactive prompting")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --config-dir
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from add cleanup blame cat checkout commit import info list lock log merge mkdir move propdel propedit propget proplist resolved revert status switch unlock update help' -r -l config-dir -d (N_ "Read user config files from named directory")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --no-unlock
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from commit import' -l no-unlock -d (N_ "Don't unlock targets")
|
2006-02-10 00:43:14 +00:00
|
|
|
# -m/--message
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from commit import lock mkdir move' -x -s m -l message -d (N_ "Specify commit message")
|
2006-02-10 00:43:14 +00:00
|
|
|
# -F/--file
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from commit import lock mkdir move' -r -s F -l file -d (N_ "Read commit message from file")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --force-log
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from commit import lock mkdir move' -l force-log -d (N_ "Force log message source validity")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --editor-cmd
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from commit import mkdir move propedit' -x -l editor-cmd -d (N_ "Specify external editor")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --recursive
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from info list propdel propget proplist resolved revert' -s R -l recursive -d (N_ "Descend recursively")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --incremental
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from list log' -l incremental -d (N_ "Give output suitable for concatenation")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --xml
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from list log' -l xml -d (N_ "Output in XML")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --diff3-cmd
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from cleanup merge switch update' -x -l diff3-cmd -d (N_ "Specify merge command")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --encoding
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from lock mkdir move propedit' -x -l encoding -d (N_ "Force encoding")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --revprop
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from propdel propedit propget' -l revprop -d (N_ "Operate on revision property")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --strict
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from propget' -l strict -d (N_ "Use strict semantics")
|
2006-02-10 00:43:14 +00:00
|
|
|
# --ignore-externals
|
2006-03-01 16:53:47 +00:00
|
|
|
complete -c svn -n '__fish_seen_subcommand_from checkout status update' -l ignore-externals -d (N_ "Ignore externals definitions")
|
2006-02-10 00:43:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Flags for svn log
|
|
|
|
#
|
|
|
|
set -l logopt -c svn -n 'contains log (commandline -poc)'
|
2006-03-01 16:53:47 +00:00
|
|
|
complete $logopt -l stop-on-copy -d (N_ "Do not cross copies")
|
|
|
|
complete $logopt -l limit -d (N_ "Maximum number of log entries")
|
2006-02-10 00:43:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Flags for svn merge
|
|
|
|
#
|
|
|
|
set -l mergeopt -c svn -n 'contains merge (commandline -poc)'
|
2006-03-01 16:53:47 +00:00
|
|
|
complete $mergeopt -l dry-run -d (N_ "Make no changes")
|
|
|
|
complete $mergeopt -l ignore-ancestry -d (N_ "Ignore ancestry when calculating merge")
|
2006-02-10 00:43:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Flags for svn status
|
|
|
|
#
|
|
|
|
set -l statusopt -c svn -n 'contains status (commandline -poc)'
|
2006-03-01 16:53:47 +00:00
|
|
|
complete $statusopt -s u -l show-updates -d (N_ "Display update information")
|
|
|
|
complete $statusopt -l no-ignore -d (N_ "Disregard ignores")
|
2006-02-10 00:43:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Flags for svn switch
|
|
|
|
#
|
|
|
|
set -l switchopt -c svn -n 'contains switch (commandline -poc)'
|
2006-03-01 16:53:47 +00:00
|
|
|
complete $switchopt -l relocate -d (N_ "Relocate VIA URL-rewriting")
|
2006-02-10 00:43:14 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Flags for svn help
|
|
|
|
#
|
|
|
|
set -l helpopt -c svn -n 'contains help (commandline -poc)'
|
2006-03-01 16:53:47 +00:00
|
|
|
complete $helpopt -l version -d (N_ "Print client version info")
|