From 6bbad942fe9c57ea61655faf583c48898a7bed2d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 21 Aug 2003 18:27:15 +0000 Subject: 18958: improved option handling for p4 change --- Completion/Unix/Command/_perforce | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_perforce') diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 6803ad6da..afadda4af 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -1173,13 +1173,17 @@ _perforce_cmd_branches() { (( $+functions[_perforce_cmd_change] )) || _perforce_cmd_change() { + local ctype + # Unless forcing or outputting, we don't + # complete committed changes since they can't be altered. + [[ ${words[(I)-*(f|o)*]} -eq 0 ]] && ctype=" -tp" _arguments -s : \ '(-o)-f[allow force by superuser]' \ '-s[joblist includes the fix status]' \ - '(-o -i)-d[describe newly created pending change]' \ + '(-o -i)-d[discard newly created pending change]' \ '(-d -i -f)-o[output specification to standard output]' \ '(-d -o)-i[read specification from standard input]' \ - '(-i)1::change:_perforce_changes -tp' + "(-i)1::change:_perforce_changes$ctype" } -- cgit v1.2.3