diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-05-19 11:10:47 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-05-19 11:10:47 +0000 |
commit | 3971345ee6474db629e27c489231645ffa2eac91 (patch) | |
tree | b21bdb8d7a2244c27794e9c7c02065b5dcd09356 | |
parent | 319af866112d35dd65ab5c7fc9fe70310a4a7748 (diff) | |
download | zsh-3971345ee6474db629e27c489231645ffa2eac91.tar.gz zsh-3971345ee6474db629e27c489231645ffa2eac91.tar.xz zsh-3971345ee6474db629e27c489231645ffa2eac91.zip |
unposted: _perforce: minor tweak to revision syntax
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Unix/Command/_perforce | 17 |
2 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index e1a410ccc..776f2e4e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-19 Peter Stephenson <pws@csr.com> + + * unposted: Completion/Unix/Command/_perforce: tweak + to allow changes and revisions with >, <, = qualifiers. + 2004-05-13 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> * 19941: Src/math.c, Test/C01arith.ztst: (( x, )) triggered diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 7083470d6..b7b429c17 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -124,6 +124,17 @@ # backslash, as before. The # and @ are never added automatically; you # have to select one by hand. # +# Perforce allows change and revision numbers to be preceded by =, <, <=, > +# or >=. See `p4 help undoc' for details. (In particular, `=' is +# an extremely useful shortcut when integrating single changes.) +# This syntax is handled, but currently the < and > must be quoted +# with a backslash, not by any other mechanism. For example, +# p4 files myfile@\>=3<TAB> +# will complete a change number. The valid syntax where the second +# change or revision in a range does not have the @ or # in front +# (for example `file@32183,32185') is not currently handled; the @ +# must be repeated. +# # File completion for some functions is restricted by the Perforce # status of the file; for example, `p4 opened' only completes opened # files (surprised?) However, you can set the style (N.B. not tag) @@ -530,7 +541,7 @@ _perforce_changes() { # in case we are looking at a range. (-tf) file=${${(Q)PREFIX}%%[\#@]*} - compset -P '*@' + compset -P '*@(|\\\<|\\\>)(|=)' ;; # Changes already submitted @@ -1236,9 +1247,9 @@ _perforce_revisions() { shift fi - # Beware of @foo,#bar; stupid but probably valid. + # Beware of @foo,#bar; stupid but valid. pfx=${${(Q)PREFIX}%%[\#@]*} - compset -P '*\#' + compset -P '*\#(|\\\<|\\\>)(|=)' # Numerical revision numbers, possibly with text. if [[ -z $PREFIX || $PREFIX = <-> ]]; then |