| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Subversion
Revision: 32924
Author: arfrever
Date: 05 Sep 2008 09:50:06
Changes:* tools/client-side/bash_completion
(_svn, _svnadmin): Use '+=' for appending to variables and fix indentation.
| ... | ...@@ -135,11 +135,11 @@ | |
| 135 | 135 | |
| 136 | 136 | # Possible expansions, without pure-prefix abbreviations such as "up". |
| 137 | 137 | cmds='add blame annotate praise cat changelist cl checkout co cleanup' |
| 138 | cmds="$cmds commit ci copy cp delete remove rm diff export help import" | |
| 139 | cmds="$cmds info list ls lock log merge mergeinfo mkdir move mv rename" | |
| 140 | cmds="$cmds propdel pdel propedit pedit propget pget proplist plist" | |
| 141 | cmds="$cmds propset pset resolve resolved revert status switch unlock" | |
| 142 | cmds="$cmds update" | |
| 138 | cmds+=" commit ci copy cp delete remove rm diff export help import" | |
| 139 | cmds+=" info list ls lock log merge mergeinfo mkdir move mv rename" | |
| 140 | cmds+=" propdel pdel propedit pedit propget pget proplist plist" | |
| 141 | cmds+=" propset pset resolve resolved revert status switch unlock" | |
| 142 | cmds+=" update" | |
| 143 | 143 | |
| 144 | 144 | # help options have a strange command status... |
| 145 | 145 | local helpOpts='--help -h' |
| ... | ...@@ -149,11 +149,11 @@ | |
| 149 | 149 | # options that require a parameter |
| 150 | 150 | # note: continued lines must end '|' continuing lines must start '|' |
| 151 | 151 | optsParam="-r|--revision|--username|--password|--targets" |
| 152 | optsParam="$optsParam|-x|--extensions|-m|--message|-F|--file" | |
| 153 | optsParam="$optsParam|--encoding|--diff-cmd|--diff3-cmd|--editor-cmd" | |
| 154 | optsParam="$optsParam|--old|--new|--config-dir|--native-eol|-l|--limit" | |
| 155 | optsParam="$optsParam|-c|--change|--depth|--set-depth|--with-revprop" | |
| 156 | optsParam="$optsParam|--changelist|--accept|--show-revs" | |
| 152 | optsParam+="|-x|--extensions|-m|--message|-F|--file" | |
| 153 | optsParam+="|--encoding|--diff-cmd|--diff3-cmd|--editor-cmd" | |
| 154 | optsParam+="|--old|--new|--config-dir|--native-eol|-l|--limit" | |
| 155 | optsParam+="|-c|--change|--depth|--set-depth|--with-revprop" | |
| 156 | optsParam+="|--changelist|--accept|--show-revs" | |
| 157 | 157 | |
| 158 | 158 | # svn:* and other (env SVN_BASH_*_PROPS) properties |
| 159 | 159 | local svnProps revProps allProps psCmds propCmds |
| ... | ...@@ -187,7 +187,7 @@ | |
| 187 | 187 | # hasRevPropOpt: is --revprop set |
| 188 | 188 | # hasRevisionOpt: is --revision set |
| 189 | 189 | # hasRelocateOpt: is --relocate set |
| 190 | # hasReintegrateOpt: is --reintegrate set | |
| 190 | # hasReintegrateOpt: is --reintegrate set | |
| 191 | 191 | # acceptOpt: the value of --accept |
| 192 | 192 | # nargs: how many arguments were found |
| 193 | 193 | # stat: status of parsing at the 'current' word |
| ... | ...@@ -471,7 +471,7 @@ | |
| 471 | 471 | # completion. It does not always work. There is a strange bug |
| 472 | 472 | # where one may get "svn:svn:xxx" in some unclear cases. |
| 473 | 473 | # |
| 474 | # Thus the handling is reprogrammed here... | |
| 474 | # Thus the handling is reprogrammed here... | |
| 475 | 475 | # The code assumes that property names look like *:*, |
| 476 | 476 | # but it also works reasonably well with simple names. |
| 477 | 477 | local choices= |
| ... | ...@@ -618,8 +618,8 @@ | |
| 618 | 618 | [[ $SVN_BASH_COMPL_EXT == *recurse* ]] || \ |
| 619 | 619 | status="$status --non-recursive" |
| 620 | 620 | |
| 621 | # I'm not sure that it can work with externals in call cases | |
| 622 | # the output contains translatable sentences (even with quiet) | |
| 621 | # I'm not sure that it can work with externals in call cases | |
| 622 | # the output contains translatable sentences (even with quiet) | |
| 623 | 623 | [[ $SVN_BASH_COMPL_EXT == *externals* ]] || \ |
| 624 | 624 | status="$status --ignore-externals" |
| 625 | 625 | |
| ... | ...@@ -684,7 +684,7 @@ | |
| 684 | 684 | |
| 685 | 685 | # when not recursive, some relevant files may exist |
| 686 | 686 | # within subdirectories, so they are added here. |
| 687 | # should it be restricted to svn-managed subdirs? no?? | |
| 687 | # should it be restricted to svn-managed subdirs? no?? | |
| 688 | 688 | if [[ $SVN_BASH_COMPL_EXT != *recurse* ]] ; then |
| 689 | 689 | files="$files $( _svn_lls dir $cur* )" |
| 690 | 690 | fi |
| ... | ...@@ -857,8 +857,8 @@ | |
| 857 | 857 | esac |
| 858 | 858 | |
| 859 | 859 | # add options that are nearly always available |
| 860 | [[ "$cmd" != "--version" ]] && cmdOpts="$cmdOpts $helpOpts" | |
| 861 | cmdOpts="$cmdOpts --config-dir" | |
| 860 | [[ "$cmd" != "--version" ]] && cmdOpts+=" $helpOpts" | |
| 861 | cmdOpts+=" --config-dir" | |
| 862 | 862 | |
| 863 | 863 | # --accept (edit|launch) incompatible with --non-interactive |
| 864 | 864 | if [[ $acceptOpt == @(edit|launch) ]] ; |
| ... | ...@@ -869,7 +869,7 @@ | |
| 869 | 869 | # take out options already given |
| 870 | 870 | for opt in $options |
| 871 | 871 | do |
| 872 | local optBase | |
| 872 | local optBase | |
| 873 | 873 | |
| 874 | 874 | # remove leading dashes and arguments |
| 875 | 875 | case $opt in |
| ... | ...@@ -998,7 +998,7 @@ | |
| 998 | 998 | ;; |
| 999 | 999 | esac |
| 1000 | 1000 | |
| 1001 | cmdOpts="$cmdOpts --help -h" | |
| 1001 | cmdOpts+=" --help -h" | |
| 1002 | 1002 | |
| 1003 | 1003 | # take out options already given |
| 1004 | 1004 | for (( i=2; i<=$COMP_CWORD-1; ++i )) ; do |