Minor tweak to vcs completion generation code. Most significantly, some svn command descriptions which where previously truncated are now complete.

darcs-hash:20070324193714-ac50b-61b10db649ef82ba8d8d658ef10cc05c2253d5f0.gz
This commit is contained in:
axel 2007-03-25 05:37:14 +10:00
parent e750f1a3c2
commit 94a483d46b
5 changed files with 76 additions and 71 deletions

View file

@ -9,8 +9,12 @@ function cap
echo $res
end
#
# Escapes the single quote (') character and removes trailing whitespace from $argv
#
function esc
echo $argv | sed -e "s/'/\\\'/g"
echo $argv | sed -e "s/'/\\\'/g" | sed -e 's/ *$//'
end
@ -142,7 +146,8 @@ function write_completions
end
for i in (list_subcommand)
set desc (cmd help $i|head -n 1|sed -e 's/[^:]*: *\(.*[^.]\)\(\|\\.\)$/\1/')
set desc (cmd help $i|head -n 3| sed -e 's/usage:.*//'| tr \n \ | sed -e 's/[^:]*: *\(.*[^.]\)\(\|\\.\)$/\1/')
set desc (esc $desc)
set cmd_str $cmd_str "-a $i --description '$desc'"
end

View file

@ -1,8 +1,8 @@
#
# Completions for the cvs command
# This file was autogenerated by the file make_mercurial_completions.fish
# which is shipped with the fish source code
# This file was autogenerated by the file make_vcs_completions.fish
# which is shipped with the fish source code.
#
#

View file

@ -1,8 +1,8 @@
#
# Completions for the darcs command
# This file was autogenerated by the file make_mercurial_completions.fish
# which is shipped with the fish source code
# This file was autogenerated by the file make_vcs_completions.fish
# which is shipped with the fish source code.
#
#

View file

@ -1,8 +1,8 @@
#
# Completions for the hg command
# This file was autogenerated by the file make_mercurial_completions.fish
# which is shipped with the fish source code
# This file was autogenerated by the file make_vcs_completions.fish
# which is shipped with the fish source code.
#
#

View file

@ -1,8 +1,8 @@
#
# Completions for the svn command
# This file was autogenerated by the file make_mercurial_completions.fish
# which is shipped with the fish source code
# This file was autogenerated by the file make_vcs_completions.fish
# which is shipped with the fish source code.
#
#
@ -14,66 +14,66 @@
# subcommands
#
complete -c svn -n '__fish_use_subcommand' -x -a add --description 'Put files and directories under version control, scheduling'
complete -c svn -n '__fish_use_subcommand' -x -a blame --description 'Output the content of specified files or'
complete -c svn -n '__fish_use_subcommand' -x -a praise --description 'Output the content of specified files or'
complete -c svn -n '__fish_use_subcommand' -x -a annotate --description 'Output the content of specified files or'
complete -c svn -n '__fish_use_subcommand' -x -a ann --description 'Output the content of specified files or'
complete -c svn -n '__fish_use_subcommand' -x -a cat --description 'Output the content of specified files or URLs'
complete -c svn -n '__fish_use_subcommand' -x -a checkout --description 'Check out a working copy from a repository'
complete -c svn -n '__fish_use_subcommand' -x -a co --description 'Check out a working copy from a repository'
complete -c svn -n '__fish_use_subcommand' -x -a cleanup --description 'Recursively clean up the working copy, removing locks, resuming'
complete -c svn -n '__fish_use_subcommand' -x -a commit --description 'Send changes from your working copy to the repository'
complete -c svn -n '__fish_use_subcommand' -x -a ci --description 'Send changes from your working copy to the repository'
complete -c svn -n '__fish_use_subcommand' -x -a copy --description 'Duplicate something in working copy or repository, remembering history'
complete -c svn -n '__fish_use_subcommand' -x -a cp --description 'Duplicate something in working copy or repository, remembering history'
complete -c svn -n '__fish_use_subcommand' -x -a delete --description 'Remove files and directories from version control'
complete -c svn -n '__fish_use_subcommand' -x -a del --description 'Remove files and directories from version control'
complete -c svn -n '__fish_use_subcommand' -x -a remove --description 'Remove files and directories from version control'
complete -c svn -n '__fish_use_subcommand' -x -a rm --description 'Remove files and directories from version control'
complete -c svn -n '__fish_use_subcommand' -x -a diff --description 'Display the differences between two revisions or paths'
complete -c svn -n '__fish_use_subcommand' -x -a di --description 'Display the differences between two revisions or paths'
complete -c svn -n '__fish_use_subcommand' -x -a export --description 'Create an unversioned copy of a tree'
complete -c svn -n '__fish_use_subcommand' -x -a help --description 'Describe the usage of this program or its subcommands'
complete -c svn -n '__fish_use_subcommand' -x -a ? --description 'Describe the usage of this program or its subcommands'
complete -c svn -n '__fish_use_subcommand' -x -a h --description 'Describe the usage of this program or its subcommands'
complete -c svn -n '__fish_use_subcommand' -x -a import --description 'Commit an unversioned file or tree into the repository'
complete -c svn -n '__fish_use_subcommand' -x -a info --description 'Display information about a local or remote item'
complete -c svn -n '__fish_use_subcommand' -x -a list --description 'List directory entries in the repository'
complete -c svn -n '__fish_use_subcommand' -x -a ls --description 'List directory entries in the repository'
complete -c svn -n '__fish_use_subcommand' -x -a lock --description 'Lock working copy paths or URLs in the repository, so that'
complete -c svn -n '__fish_use_subcommand' -x -a log --description 'Show the log messages for a set of revision(s) and/or file(s)'
complete -c svn -n '__fish_use_subcommand' -x -a merge --description 'Apply the differences between two sources to a working copy path'
complete -c svn -n '__fish_use_subcommand' -x -a mkdir --description 'Create a new directory under version control'
complete -c svn -n '__fish_use_subcommand' -x -a move --description 'Move and/or rename something in working copy or repository'
complete -c svn -n '__fish_use_subcommand' -x -a mv --description 'Move and/or rename something in working copy or repository'
complete -c svn -n '__fish_use_subcommand' -x -a rename --description 'Move and/or rename something in working copy or repository'
complete -c svn -n '__fish_use_subcommand' -x -a ren --description 'Move and/or rename something in working copy or repository'
complete -c svn -n '__fish_use_subcommand' -x -a propdel --description 'Remove a property from files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a pdel --description 'Remove a property from files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a pd --description 'Remove a property from files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a propedit --description 'Edit a property with an external editor'
complete -c svn -n '__fish_use_subcommand' -x -a pedit --description 'Edit a property with an external editor'
complete -c svn -n '__fish_use_subcommand' -x -a pe --description 'Edit a property with an external editor'
complete -c svn -n '__fish_use_subcommand' -x -a propget --description 'Print the value of a property on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a pget --description 'Print the value of a property on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a pg --description 'Print the value of a property on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a proplist --description 'List all properties on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a plist --description 'List all properties on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a pl --description 'List all properties on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a propset --description 'Set the value of a property on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a pset --description 'Set the value of a property on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a ps --description 'Set the value of a property on files, dirs, or revisions'
complete -c svn -n '__fish_use_subcommand' -x -a resolved --description 'Remove \'conflicted\' state on working copy files or directories'
complete -c svn -n '__fish_use_subcommand' -x -a revert --description 'Restore pristine working copy file (undo most local edits)'
complete -c svn -n '__fish_use_subcommand' -x -a status --description 'Print the status of working copy files and directories'
complete -c svn -n '__fish_use_subcommand' -x -a stat --description 'Print the status of working copy files and directories'
complete -c svn -n '__fish_use_subcommand' -x -a st --description 'Print the status of working copy files and directories'
complete -c svn -n '__fish_use_subcommand' -x -a switch --description 'Update the working copy to a different URL'
complete -c svn -n '__fish_use_subcommand' -x -a sw --description 'Update the working copy to a different URL'
complete -c svn -n '__fish_use_subcommand' -x -a unlock --description 'Unlock working copy paths or URLs'
complete -c svn -n '__fish_use_subcommand' -x -a update --description 'Bring changes from the repository into the working copy'
complete -c svn -n '__fish_use_subcommand' -x -a up --description 'Bring changes from the repository into the working copy'
complete -c svn -n '__fish_use_subcommand' -x -a add --description 'Put files and directories under version control, scheduling them for addition to repository. They will be added in next commit.'
complete -c svn -n '__fish_use_subcommand' -x -a blame --description 'Output the content of specified files or URLs with revision and author information in-line.'
complete -c svn -n '__fish_use_subcommand' -x -a praise --description 'Output the content of specified files or URLs with revision and author information in-line.'
complete -c svn -n '__fish_use_subcommand' -x -a annotate --description 'Output the content of specified files or URLs with revision and author information in-line.'
complete -c svn -n '__fish_use_subcommand' -x -a ann --description 'Output the content of specified files or URLs with revision and author information in-line.'
complete -c svn -n '__fish_use_subcommand' -x -a cat --description 'Output the content of specified files or URLs.'
complete -c svn -n '__fish_use_subcommand' -x -a checkout --description 'Check out a working copy from a repository.'
complete -c svn -n '__fish_use_subcommand' -x -a co --description 'Check out a working copy from a repository.'
complete -c svn -n '__fish_use_subcommand' -x -a cleanup --description 'Recursively clean up the working copy, removing locks, resuming unfinished operations, etc.'
complete -c svn -n '__fish_use_subcommand' -x -a commit --description 'Send changes from your working copy to the repository.'
complete -c svn -n '__fish_use_subcommand' -x -a ci --description 'Send changes from your working copy to the repository.'
complete -c svn -n '__fish_use_subcommand' -x -a copy --description 'Duplicate something in working copy or repository, remembering history.'
complete -c svn -n '__fish_use_subcommand' -x -a cp --description 'Duplicate something in working copy or repository, remembering history.'
complete -c svn -n '__fish_use_subcommand' -x -a delete --description 'Remove files and directories from version control. 2. delete URL...'
complete -c svn -n '__fish_use_subcommand' -x -a del --description 'Remove files and directories from version control. 2. delete URL...'
complete -c svn -n '__fish_use_subcommand' -x -a remove --description 'Remove files and directories from version control. 2. delete URL...'
complete -c svn -n '__fish_use_subcommand' -x -a rm --description 'Remove files and directories from version control. 2. delete URL...'
complete -c svn -n '__fish_use_subcommand' -x -a diff --description 'Display the differences between two revisions or paths. 2. diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] \'
complete -c svn -n '__fish_use_subcommand' -x -a di --description 'Display the differences between two revisions or paths. 2. diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] \'
complete -c svn -n '__fish_use_subcommand' -x -a export --description 'Create an unversioned copy of a tree. 2. export [-r REV] PATH1[@PEGREV] [PATH2]'
complete -c svn -n '__fish_use_subcommand' -x -a help --description 'Describe the usage of this program or its subcommands.'
complete -c svn -n '__fish_use_subcommand' -x -a ? --description 'Describe the usage of this program or its subcommands.'
complete -c svn -n '__fish_use_subcommand' -x -a h --description 'Describe the usage of this program or its subcommands.'
complete -c svn -n '__fish_use_subcommand' -x -a import --description 'Commit an unversioned file or tree into the repository.'
complete -c svn -n '__fish_use_subcommand' -x -a info --description 'Display information about a local or remote item.'
complete -c svn -n '__fish_use_subcommand' -x -a list --description 'List directory entries in the repository.'
complete -c svn -n '__fish_use_subcommand' -x -a ls --description 'List directory entries in the repository.'
complete -c svn -n '__fish_use_subcommand' -x -a lock --description 'Lock working copy paths or URLs in the repository, so that no other user can commit changes to them.'
complete -c svn -n '__fish_use_subcommand' -x -a log --description 'Show the log messages for a set of revision(s) and/or file(s). 2. log URL[@REV] [PATH...]'
complete -c svn -n '__fish_use_subcommand' -x -a merge --description 'Apply the differences between two sources to a working copy path. 2. merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]'
complete -c svn -n '__fish_use_subcommand' -x -a mkdir --description 'Create a new directory under version control. 2. mkdir URL...'
complete -c svn -n '__fish_use_subcommand' -x -a move --description 'Move and/or rename something in working copy or repository.'
complete -c svn -n '__fish_use_subcommand' -x -a mv --description 'Move and/or rename something in working copy or repository.'
complete -c svn -n '__fish_use_subcommand' -x -a rename --description 'Move and/or rename something in working copy or repository.'
complete -c svn -n '__fish_use_subcommand' -x -a ren --description 'Move and/or rename something in working copy or repository.'
complete -c svn -n '__fish_use_subcommand' -x -a propdel --description 'Remove a property from files, dirs, or revisions. 2. propdel PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pdel --description 'Remove a property from files, dirs, or revisions. 2. propdel PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pd --description 'Remove a property from files, dirs, or revisions. 2. propdel PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a propedit --description 'Edit a property with an external editor. 2. propedit PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pedit --description 'Edit a property with an external editor. 2. propedit PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pe --description 'Edit a property with an external editor. 2. propedit PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a propget --description 'Print the value of a property on files, dirs, or revisions. 2. propget PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pget --description 'Print the value of a property on files, dirs, or revisions. 2. propget PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pg --description 'Print the value of a property on files, dirs, or revisions. 2. propget PROPNAME --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a proplist --description 'List all properties on files, dirs, or revisions. 2. proplist --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a plist --description 'List all properties on files, dirs, or revisions. 2. proplist --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pl --description 'List all properties on files, dirs, or revisions. 2. proplist --revprop -r REV [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a propset --description 'Set the value of a property on files, dirs, or revisions. 2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a pset --description 'Set the value of a property on files, dirs, or revisions. 2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a ps --description 'Set the value of a property on files, dirs, or revisions. 2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]'
complete -c svn -n '__fish_use_subcommand' -x -a resolved --description 'Remove \'conflicted\' state on working copy files or directories.'
complete -c svn -n '__fish_use_subcommand' -x -a revert --description 'Restore pristine working copy file (undo most local edits).'
complete -c svn -n '__fish_use_subcommand' -x -a status --description 'Print the status of working copy files and directories.'
complete -c svn -n '__fish_use_subcommand' -x -a stat --description 'Print the status of working copy files and directories.'
complete -c svn -n '__fish_use_subcommand' -x -a st --description 'Print the status of working copy files and directories.'
complete -c svn -n '__fish_use_subcommand' -x -a switch --description 'Update the working copy to a different URL. 2. switch --relocate FROM TO [PATH...]'
complete -c svn -n '__fish_use_subcommand' -x -a sw --description 'Update the working copy to a different URL. 2. switch --relocate FROM TO [PATH...]'
complete -c svn -n '__fish_use_subcommand' -x -a unlock --description 'Unlock working copy paths or URLs.'
complete -c svn -n '__fish_use_subcommand' -x -a update --description 'Bring changes from the repository into the working copy.'
complete -c svn -n '__fish_use_subcommand' -x -a up --description 'Bring changes from the repository into the working copy.'
#