diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2012-12-17 19:50:31 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2012-12-17 19:51:41 +0100 |
commit | 049f4be0b89188e1bc3e19e75c0675dd2356d3ef (patch) | |
tree | 7b6cc1a6611683b28888f8f7172ce8ceba773c30 /Completion/Unix/Command/_perforce | |
parent | 015e05572733aafd2a005edd507d16e2310653a0 (diff) | |
parent | 7152094541a54c92ff937413f850e09412585b7b (diff) | |
download | zsh-049f4be0b89188e1bc3e19e75c0675dd2356d3ef.tar.gz zsh-049f4be0b89188e1bc3e19e75c0675dd2356d3ef.zip |
New upstream test release
Diffstat (limited to 'Completion/Unix/Command/_perforce')
-rw-r--r-- | Completion/Unix/Command/_perforce | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 2c1365a79..d2943472c 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -474,8 +474,17 @@ _perforce_gen_cmd_list() { # Ignore blank lines and the heading line beginning `Perforce...' # Just gets run once, then cached, so don't bother optimising # this to a grossly unreadable parameter substitution. + _perforce_cmd_list=() _perforce_call_p4 help-commands help commands | while read -A hline; do - (( ${#hline} < 2 )) && continue + if (( ${#hline} < 2 )); then + if (( ${#_perforce_cmd_list} )); then + # Ignore comments after the main list of commands, separate by blank + # line. + break + else + continue + fi + fi [[ $hline[1] = (#i)perforce ]] && continue _perforce_cmd_list+=("${hline[1]}:${hline[2,-1]}") done @@ -2010,7 +2019,7 @@ _perforce_cmd_fix() { '-s[set job status]:status:_perforce_statuses' \ '1::-c required:(-c)' \ '2::change:_perforce_changes' \ - "3::job:_perforce_jobs$job" + "*::job:_perforce_jobs$job" } |