diff --git a/make_vcs_completions.fish b/make_vcs_completions.fish index 8c576d0aa..486d7defd 100755 --- a/make_vcs_completions.fish +++ b/make_vcs_completions.fish @@ -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 diff --git a/share/completions/cvs.fish b/share/completions/cvs.fish index 19cc07e28..6b647a611 100644 --- a/share/completions/cvs.fish +++ b/share/completions/cvs.fish @@ -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. # # diff --git a/share/completions/darcs.fish b/share/completions/darcs.fish index f4330446e..824e5df75 100644 --- a/share/completions/darcs.fish +++ b/share/completions/darcs.fish @@ -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. # # @@ -73,7 +73,7 @@ complete -c darcs -n 'contains \'add\' (commandline -poc)' -l boring --descripti complete -c darcs -n 'contains \'add\' (commandline -poc)' -l case-ok --description 'Don\'t refuse to add files differing only in case' complete -c darcs -n 'contains \'add\' (commandline -poc)' -s r -l recursive --description 'Add contents of subdirectories' complete -c darcs -n 'contains \'add\' (commandline -poc)' -l not-recursive --description 'Don\'t add contents of subdirectories' -complete -c darcs -n 'contains \'add\' (commandline -poc)' -l date-trick --description 'Add files with date appended to avoid conflict. [EXPERIMENTAL] ' +complete -c darcs -n 'contains \'add\' (commandline -poc)' -l date-trick --description 'Add files with date appended to avoid conflict. [EXPERIMENTAL]' complete -c darcs -n 'contains \'add\' (commandline -poc)' -l no-date-trick --description 'Don\'t use experimental date appending trick. [DEFAULT]' complete -c darcs -n 'contains \'add\' (commandline -poc)' -s v -l verbose --description 'Give verbose output' complete -c darcs -n 'contains \'add\' (commandline -poc)' -s q -l quiet --description 'Suppress informational output' diff --git a/share/completions/hg.fish b/share/completions/hg.fish index db1ae156b..ae4e33780 100644 --- a/share/completions/hg.fish +++ b/share/completions/hg.fish @@ -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. # # diff --git a/share/completions/svn.fish b/share/completions/svn.fish index 1fa2adb46..761c7bb40 100644 --- a/share/completions/svn.fish +++ b/share/completions/svn.fish @@ -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.' #