summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_perforce
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command/_perforce')
-rw-r--r--Completion/Unix/Command/_perforce614
1 files changed, 307 insertions, 307 deletions
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index 43a776184..c9e20ca32 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -169,7 +169,7 @@
# of course applied as usual, so setting ignored-patterns for the
# context `:completion:*:p4[-:]*' should work.
-_p4() {
+_perforce() {
# rely on localoptions
setopt nonomatch
local p4cmd==p4
@@ -180,9 +180,9 @@ _p4() {
# Some of these --- in particular P4PORT --- don't need
# the perforce server.
case $compstate[parameter] in
- (P4PORT) _p4_host_port
+ (P4PORT) _perforce_host_port
;;
- (P4CLIENT) _p4_clients
+ (P4CLIENT) _perforce_clients
;;
esac
# We do not handle values anywhere else.
@@ -194,8 +194,8 @@ _p4() {
return
fi
- if (( ! ${#_p4_cmd_list} )); then
- (( ${+_p4_cmd_list} )) || typeset -ga _p4_cmd_list
+ if (( ! ${#_perforce_cmd_list} )); then
+ (( ${+_perforce_cmd_list} )) || typeset -ga _perforce_cmd_list
local hline
# Output looks like <tab>command-name<space>description in words...
# Ignore blank lines and the heading line beginning `Perforce...'
@@ -204,7 +204,7 @@ _p4() {
_call_program help-commands p4 help commands | while read -A hline; do
(( ${#hline} < 2 )) && continue
[[ $hline[1] = (#i)perforce ]] && continue
- _p4_cmd_list+=("${hline[1]}:${hline[2,-1]}")
+ _perforce_cmd_list+=("${hline[1]}:${hline[2,-1]}")
done
fi
@@ -223,8 +223,8 @@ _p4() {
if (( i >= CURRENT )); then
_arguments -s : \
- '-c+[client]:client:_p4_clients' \
- '-C+[charset]:charset:_p4_charset' \
+ '-c+[client]:client:_perforce_clients' \
+ '-C+[charset]:charset:_perforce_charset' \
'-d+[current directory]:directory:_path_files -g "*(/)"' \
'-H+[hostname]:host:_hosts' \
'-G[python output]' \
@@ -233,13 +233,13 @@ _p4() {
'-P+[password on server]:password: ' \
'-s[output script tags]' \
'-u+[user]:user name:_users' \
- '-x+[filename or -]:file:_p4_file_or_Minus' \
- '1:perforce command:_p4_command'
+ '-x+[filename or -]:file:_perforce_file_or_Minus' \
+ '1:perforce command:_perforce_command'
else
(( i-- ))
(( CURRENT -= i ))
shift $i words
- _p4_command_arg
+ _perforce_command_arg
fi
}
@@ -248,18 +248,18 @@ _p4() {
# Command and argument dispatchers
#
-(( $+functions[_p4_command] )) ||
-_p4_command() {
- _describe -t p4-commands 'Perforce command' _p4_cmd_list
+(( $+functions[_perforce_command] )) ||
+_perforce_command() {
+ _describe -t p4-commands 'Perforce command' _perforce_cmd_list
}
-(( $+functions[_p4_command_arg] )) ||
-_p4_command_arg() {
+(( $+functions[_perforce_command_arg] )) ||
+_perforce_command_arg() {
local curcontext="$curcontext" cmd=${words[1]}
- if (( $+functions[_p4_cmd_$cmd] )); then
+ if (( $+functions[_perforce_cmd_$cmd] )); then
curcontext="${curcontext%:*:*}:p4-${cmd}:"
- _p4_cmd_$cmd
+ _perforce_cmd_$cmd
else
_message "unhandled perforce command: $cmd"
fi
@@ -270,8 +270,8 @@ _p4_command_arg() {
# Helper functions
#
-(( $+functions[_p4_branches] )) ||
-_p4_branches() {
+(( $+functions[_perforce_branches] )) ||
+_perforce_branches() {
local bline match mbegin mend
local -a bl
bl=(${${${(f)"$(_call_program branches p4 branches 2>/dev/null)"}##Branch }/ /:})
@@ -280,8 +280,8 @@ _p4_branches() {
}
-(( $+functions[_p4_changelist] )) ||
-_p4_changelist() {
+(( $+functions[_perforce_changelist] )) ||
+_perforce_changelist() {
local cline match mbegin mend max ctype num comma file
local -a cl cstatus
@@ -321,7 +321,7 @@ _p4_changelist() {
;;
# Range allowed: append comma and supply rules for
# removing and handling subsequent `#'.
- (-tR) comma=(-S, -R _p4_file_suffix)
+ (-tR) comma=(-S, -R _perforce_file_suffix)
esac
argv=($argv[1,-2])
done
@@ -335,16 +335,16 @@ ${${${${(f)"$(_call_program changes p4 changes -m ${max:-20} $cstatus \$file)"}#
}
-(( $+functions[_p4_charset] )) ||
-_p4_charset() {
+(( $+functions[_perforce_charset] )) ||
+_perforce_charset() {
local expl
_wanted charset expl 'character set' \
compadd eucjp iso8859-1 shiftjis utf8 winansi
}
-(( $+functions[_p4_clients] )) ||
-_p4_clients() {
+(( $+functions[_perforce_clients] )) ||
+_perforce_clients() {
local cline match mbegin mend
local -a slash cl
@@ -357,8 +357,8 @@ _p4_clients() {
}
-(( $+functions[_p4_counters] )) ||
-_p4_counters() {
+(( $+functions[_perforce_counters] )) ||
+_perforce_counters() {
local cline match mbegin mend
local -a cl
@@ -368,8 +368,8 @@ _p4_counters() {
}
-(( $+functions[_p4_counter_value] )) ||
-_p4_counter_value() {
+(( $+functions[_perforce_counter_value] )) ||
+_perforce_counter_value() {
if [[ -n $words[CURRENT-1] ]]; then
local value="$(_call_program counter p4 counter $words[CURRENT-1] 2>/dev/null)"
if [[ -n $value ]]; then
@@ -381,8 +381,8 @@ _p4_counter_value() {
}
-(( $+functions[_p4_depots] )) ||
-_p4_depots() {
+(( $+functions[_perforce_depots] )) ||
+_perforce_depots() {
local dline match mbegin mend max
local -a dl
@@ -392,14 +392,14 @@ _p4_depots() {
}
-(( $+functions[_p4_file_or_minus] )) ||
-_p4_file_or_minus() {
+(( $+functions[_perforce_file_or_minus] )) ||
+_perforce_file_or_minus() {
_alternative 'minus:minus sign:(-)' 'files:file name:_files'
}
-(( $+functions[_p4_file_suffx] )) ||
-_p4_file_suffix() {
+(( $+functions[_perforce_file_suffx] )) ||
+_perforce_file_suffix() {
# Used with compadd -R to handle @ or # after a file name.
# Differs from compadd -r '...' in that it quotes `#' if typed.
[[ $1 = 1 ]] || return
@@ -423,13 +423,13 @@ _p4_file_suffix() {
#
-# Helper functions for the helper function _p4_files. These files
+# Helper functions for the helper function _perforce_files. These files
# are low-level enough that they don't handle tags; this is done
-# by the _alternative handler in _p4_files.
+# by the _alternative handler in _perforce_files.
#
-(( $+functions[_p4_integrated_files] )) ||
-_p4_integrated_files() {
+(( $+functions[_perforce_integrated_files] )) ||
+_perforce_integrated_files() {
local pfx=${(Q)PREFIX} type
local -a files
@@ -440,8 +440,8 @@ _p4_integrated_files() {
}
-(( $+functions[_p4_opened_files] )) ||
-_p4_opened_files() {
+(( $+functions[_perforce_opened_files] )) ||
+_perforce_opened_files() {
local pfx=${(Q)PREFIX} type
local -a files
@@ -452,8 +452,8 @@ _p4_opened_files() {
}
-(( $+functions[_p4_resolved_files] )) ||
-_p4_resolved_files() {
+(( $+functions[_perforce_resolved_files] )) ||
+_perforce_resolved_files() {
local pfx=${(Q)PREFIX} type
local -a files
@@ -463,8 +463,8 @@ _p4_resolved_files() {
compadd "$@" -a files
}
-(( $+functions[_p4_subdir_search] )) ||
-_p4_subdir_search() {
+(( $+functions[_perforce_subdir_search] )) ||
+_perforce_subdir_search() {
# This has no other function than to offer to add the `...' used
# by Perforce to indicate a recursive search of directories.
# Bit pathetic, really.
@@ -472,8 +472,8 @@ _p4_subdir_search() {
compadd "$@" '...'
}
-(( $+functions[_p4_depot_dirs] )) ||
-_p4_depot_dirs() {
+(( $+functions[_perforce_depot_dirs] )) ||
+_perforce_depot_dirs() {
# Normal completion of directories in depots
local pfx=${(Q)PREFIX} expl
local -a files
@@ -484,8 +484,8 @@ _p4_depot_dirs() {
compadd "$@" -S / -q -a files
}
-(( $+functions[_p4_depot_files] )) ||
-_p4_depot_files() {
+(( $+functions[_perforce_depot_files] )) ||
+_perforce_depot_files() {
# Normal completion of files in depots
local pfx=${(Q)PREFIX} expl
local -a files
@@ -493,11 +493,11 @@ _p4_depot_files() {
compset -P '*/'
files=(${${${(f)"$(_call_program files p4 files \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
[[ $#files -eq 1 && $files[1] = '' ]] && files=()
- compadd "$@" -R _p4_file_suffix -a files
+ compadd "$@" -R _perforce_file_suffix -a files
}
-(( $+functions[_p4_client_dirs] )) ||
-_p4_client_dirs() {
+(( $+functions[_perforce_client_dirs] )) ||
+_perforce_client_dirs() {
# This is a slightly odd addition which isn't often necessary.
# When completing directories in a client specification, Perforce
# doesn't tell you about intermediate directories which are in
@@ -514,31 +514,31 @@ _p4_client_dirs() {
# We don't want to waste time on this, since it's not the usual
# case, so we cache the results where necessary. This means
# recording all the clients that we can later ask about if necessary.
- # To flush the cache, `unset _p4_client_list _p4_client_dirs'.
- if (( ! ${+_p4_client_list} )); then
+ # To flush the cache, `unset _perforce_client_list _perforce_client_dirs'.
+ if (( ! ${+_perforce_client_list} )); then
# Retrieve the list of clients.
- typeset -gA _p4_client_list
+ typeset -gA _perforce_client_list
local -a tmplist
local tmpelt
tmplist=(${${${(f)"$(_call_program clients p4 clients)"}##Client\ }%%\ *})
[[ $#tmplist -eq 1 && $tmplist[1] = '' ]] && tmplist=()
for tmpelt in $tmplist; do
- _p4_client_list[$tmpelt]=1
+ _perforce_client_list[$tmpelt]=1
done
fi
# See if the first path element is a client. Very often it
# will actually be a depot, so we test this as quickly as possible.
local client=${${PREFIX##//}%%/*}
- [[ -z ${_p4_client_list[$client]} ]] && return 1
+ [[ -z ${_perforce_client_list[$client]} ]] && return 1
local oldifs=$IFS IFS= type dir line dirs
- (( ${+_p4_client_dirs} )) || typeset -gA _p4_client_dirs
+ (( ${+_perforce_client_dirs} )) || typeset -gA _perforce_client_dirs
- if (( ${+_p4_client_dirs[$client]} )); then
+ if (( ${+_perforce_client_dirs[$client]} )); then
# Already cached, although may be empty.
- dirs=${_p4_client_dirs[$client]}
+ dirs=${_perforce_client_dirs[$client]}
else
# We need to look at the View stanza of the client record
# to see what directories exist in the client view.
@@ -585,8 +585,8 @@ _p4_client_dirs() {
compadd -S / -q "$@" -- ${dirs%%/*}
}
-(( $+functions[_p4_files] )) ||
-_p4_files() {
+(( $+functions[_perforce_files] )) ||
+_perforce_files() {
local pfx fline expl opt match mbegin mend range type
local -a files types
@@ -623,9 +623,9 @@ _p4_files() {
# After @ you can specify changelists, clients, labels or dates.
# Don't try to complete dates.
_alternative \
- "changelist:changelist:_p4_changelist $range -tf" \
- client:client:_p4_clients \
- label:label:_p4_labels
+ "changelist:changelist:_perforce_changelist $range -tf" \
+ client:client:_perforce_clients \
+ label:label:_perforce_labels
elif [[ -prefix *\# ]]; then
# Check for existing range syntax
[[ $PREFIX = *[@\#]*,* ]] && range=
@@ -633,7 +633,7 @@ _p4_files() {
# automatically handles filenames in ranges e.g. `foo#1,#3'.
# (Note the compset removes the maximum possible head match,
# so we only complete the second part of the range in that case.)
- _p4_revisions $range
+ _perforce_revisions $range
elif [[ $PREFIX = //* ]]; then
# This specifies files already handled by Perforce, so there's
# no point trying to look for unmaintained files. Assume
@@ -643,25 +643,25 @@ _p4_files() {
if [[ $PREFIX = //[^/]# ]]; then
# Complete //clientname spec. Don't complete non-directories...
# I don't actually know if they are valid here.
- altfiles+=("clients:Perforce client:_p4_clients")
+ altfiles+=("clients:Perforce client:_perforce_clients")
else
local donefiles=1
if [[ -z $dodirs ]]; then
if [[ ${#types} -gt 0 ]] &&
! zstyle -t ":completion:${curcontext}:" all-files; then
for type in $types; do
- altfiles+=("$type-files:$type file:_p4_${type}_files")
+ altfiles+=("$type-files:$type file:_perforce_${type}_files")
done
else
- altfiles+=("depot-files:file in depot:_p4_depot_files")
+ altfiles+=("depot-files:file in depot:_perforce_depot_files")
fi
fi
# Intermediate directories in a client view.
# See function for notes.
- altfiles+=("client-dirs:client directory:_p4_client_dirs")
+ altfiles+=("client-dirs:client directory:_perforce_client_dirs")
fi
- altfiles+=("depot-dirs:directory in depot:_p4_depot_dirs"
- "subdirs:subdirectory search:_p4_subdir_search")
+ altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs"
+ "subdirs:subdirectory search:_perforce_subdir_search")
_alternative $altfiles
elif [[ -n $unmaintained && -z $dodirs ]]; then
# a la _cvs_nonentried_files: directories are never maintained,
@@ -691,25 +691,25 @@ _p4_files() {
local -a altfiles
for type in $types; do
- altfiles+=("$type-files:$type file:_p4_${type}_files")
+ altfiles+=("$type-files:$type file:_perforce_${type}_files")
done
- altfiles+=("depot-dirs:directory in depot:_p4_depot_dirs"
- "subdirs:subdirectory search:_p4_subdir_search")
+ altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs"
+ "subdirs:subdirectory search:_perforce_subdir_search")
_alternative $altfiles
elif zstyle -t ":completion:${curcontext}:" depot-files; then
local -a altfiles
if [[ -z $dodirs ]]; then
- altfiles+=("depot-files:file in depot:_p4_depot_files")
+ altfiles+=("depot-files:file in depot:_perforce_depot_files")
fi
- altfiles+=("depot-dirs:directory in depot:_p4_depot_dirs"
- "subdirs:subdirectory search:_p4_subdir_search")
+ altfiles+=("depot-dirs:directory in depot:_perforce_depot_dirs"
+ "subdirs:subdirectory search:_perforce_subdir_search")
_alternative $altfiles
else
# Look locally.
_alternative \
- "files:file:_path_files -R _p4_file_suffix $dodirs" \
- "subdirs:subdirectory search:_p4_subdir_search"
+ "files:file:_path_files -R _perforce_file_suffix $dodirs" \
+ "subdirs:subdirectory search:_perforce_subdir_search"
fi
}
@@ -718,8 +718,8 @@ _p4_files() {
# Remaining helpers for other types of Perforce metadata.
#
-(( $+functions[_p4_filetypes] )) ||
-_p4_filetypes() {
+(( $+functions[_perforce_filetypes] )) ||
+_perforce_filetypes() {
local -a values
if compset -P '*+*'; then
# That second `*' is deliberate --- only complete the last
@@ -748,14 +748,14 @@ _p4_filetypes() {
}
-(( $+functions[_p4_groups] )) ||
-_p4_groups() {
+(( $+functions[_perforce_groups] )) ||
+_perforce_groups() {
_describe -t groups 'Perforce group' $(_call_program groups p4 groups)
}
-(( $+functions[_p4_host_port] )) ||
-_p4_host_port() {
+(( $+functions[_perforce_host_port] )) ||
+_perforce_host_port() {
if compset -P '*:'; then
_ports
else
@@ -764,8 +764,8 @@ _p4_host_port() {
fi
}
-(( $+functions[_p4_jobs] )) ||
-_p4_jobs() {
+(( $+functions[_perforce_jobs] )) ||
+_perforce_jobs() {
local jline match mbegin mend max
local -a jl
@@ -789,8 +789,8 @@ _p4_jobs() {
_describe -t jobs 'Perforce job' jl
}
-(( $+functions[_p4_jobview] )) ||
-_p4_jobview() {
+(( $+functions[_perforce_jobview] )) ||
+_perforce_jobview() {
# Jobviews (see `p4 help jobview') are ways of interrogating the
# jobs/fixes database. It's basically either a set of strings,
# or a set of key=value pairs, or some combination, separated
@@ -856,7 +856,7 @@ _p4_jobview() {
valuespec+=("${key}:${p4fields[$key]}:(${p4values[$key]//\\// })")
elif [[ $key = job ]]; then
# Nothing special for jobs; add our own completion.
- valuespec+=("${key}:Perforce job:_p4_jobs")
+ valuespec+=("${key}:Perforce job:_perforce_jobs")
elif [[ $key = user ]]; then
# Nothing provided for user; add our own completion.
valuespec+=("${key}:user:_users")
@@ -868,8 +868,8 @@ _p4_jobview() {
_values 'Job specification parameter' $valuespec
}
-(( $+functions[_p4_labels] )) ||
-_p4_labels() {
+(( $+functions[_perforce_labels] )) ||
+_perforce_labels() {
local lline match mbegin mend
local -a ll
_call_program labels p4 labels | while read lline; do
@@ -881,8 +881,8 @@ _p4_labels() {
}
-(( $+functions[_p4_revisions] )) ||
-_p4_revisions() {
+(( $+functions[_perforce_revisions] )) ||
+_perforce_revisions() {
# Doesn't handle standard completion options; requires space
# in front if used as action in _arguments.
@@ -891,7 +891,7 @@ _p4_revisions() {
if [[ $1 = -tR ]]; then
# handle ranges
- comma=(-S, -R _p4_file_suffix)
+ comma=(-S, -R _perforce_file_suffix)
shift
fi
@@ -903,8 +903,8 @@ _p4_revisions() {
if [[ -z $PREFIX || $PREFIX = <-> ]]; then
# always allowed (same as none)
rl+=(0)
- _call_program filelog p4 filelog $1 2>/dev/null | while read rline; do
- if [[ $rline = (#b)'... #'(<->)*\'(*)\' ]]; then
+ _call_program filelog 'p4 filelog $pfx' 2>/dev/null | while read rline; do
+ if [[ $rline = (#b)'... #'(<->)' change '(*) ]]; then
rl+=("${match[1]}:${match[2]}")
fi
done
@@ -918,8 +918,8 @@ _p4_revisions() {
}
-(( $+functions[_p4_status] )) ||
-_p4_status() {
+(( $+functions[_perforce_status] )) ||
+_perforce_status() {
# Perforce statuses are usually limited to a set of values
# given by the jobspec.
local jline match mbegin mend
@@ -940,8 +940,8 @@ _p4_status() {
}
-(( $+functions[_p4_variables] )) ||
-_p4_variables() {
+(( $+functions[_perforce_variables] )) ||
+_perforce_variables() {
local line match mbegin mend expl
local -a vars
@@ -958,17 +958,17 @@ _p4_variables() {
# Completions for p4 commands
#
-(( $+functions[_p4_cmd_add] )) ||
-_p4_cmd_add() {
+(( $+functions[_perforce_cmd_add] )) ||
+_perforce_cmd_add() {
_arguments -s : \
- '-c+[select by changelist]:changelist:_p4_changelist -tp' \
- '-t+[set file type]:file type:_p4_filetypes' \
- '*:file:_p4_files -tu'
+ '-c+[select by changelist]:changelist:_perforce_changelist -tp' \
+ '-t+[set file type]:file type:_perforce_filetypes' \
+ '*:file:_perforce_files -tu'
}
-(( $+functions[_p4_cmd_admin] )) ||
-_p4_cmd_admin() {
+(( $+functions[_perforce_cmd_admin] )) ||
+_perforce_cmd_admin() {
if (( CURRENT == 2 )); then
local -a adcmds
adcmds=(
@@ -986,130 +986,130 @@ _p4_cmd_admin() {
}
-(( $+functions[_p4_cmd_annotate] )) ||
-_p4_cmd_annotate() {
+(( $+functions[_perforce_cmd_annotate] )) ||
+_perforce_cmd_annotate() {
# If you don't have this, it's new in release 2002.2.
_arguments -s : \
'-a[all, show both added and deleted lines]' \
'-q[quiet, suppress one-line file header]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_branch] )) ||
-_p4_cmd_branch() {
+(( $+functions[_perforce_cmd_branch] )) ||
+_perforce_cmd_branch() {
_arguments -s : \
'(-o)-f[force operation by superuser]' \
'(-o -i)-d[delete branch]' \
'(-d -i -f)-o[write specification to standard output]' \
'(-d -o)-i[read specificationf from standard input]' \
- '(-i)*::branch name:_p4_branches'
+ '(-i)*::branch name:_perforce_branches'
}
-(( $+functions[_p4_cmd_branches] )) ||
-_p4_cmd_branches() {
+(( $+functions[_perforce_cmd_branches] )) ||
+_perforce_cmd_branches() {
# No arguments.
_arguments -s :
}
-(( $+functions[_p4_cmd_change] )) ||
-_p4_cmd_change() {
+(( $+functions[_perforce_cmd_change] )) ||
+_perforce_cmd_change() {
_arguments -s : \
'(-o)-f[allow force by superuser]' \
'-s[joblist includes the fix status]' \
'(-o -i)-d[describe newly created pending change]' \
'(-d -i -f)-o[output specification to standard output]' \
'(-d -o)-i[read specification from standard input]' \
- '(-i)1::changelist:_p4_changelist -tp'
+ '(-i)1::changelist:_perforce_changelist -tp'
}
-(( $+functions[_p4_cmd_changes] )) ||
-_p4_cmd_changes() {
+(( $+functions[_perforce_cmd_changes] )) ||
+_perforce_cmd_changes() {
_arguments -s : \
'-i[include integrated changes]' \
'-l[long output]' \
- '-c[select by client]:client:_p4_clients' \
+ '-c[select by client]:client:_perforce_clients' \
'-m[most recent N changes]:max changes: ' \
'-s[select by status]:status:(pending submitted)' \
'-u[select by user]:user:_users' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_client] )) ||
-_p4_cmd_client() {
+(( $+functions[_perforce_cmd_client] )) ||
+_perforce_cmd_client() {
_arguments -s : \
'-f[force modification by superuser]' \
- '-t[use template]:template client:_p4_clients' \
+ '-t[use template]:template client:_perforce_clients' \
'(-o -i -t)-d[delete client]' \
'(-d -i -f)-o[print to standard output]' \
'(-d -o -t)-i[read from standard input]' \
- '1::file:_p4_clients'
+ '1::file:_perforce_clients'
}
-(( $+functions[_p4_cmd_clients] )) ||
-_p4_cmd_clients() {
+(( $+functions[_perforce_cmd_clients] )) ||
+_perforce_cmd_clients() {
# No arguments.
_arguments -s :
}
-(( $+functions[_p4_cmd_counter] )) ||
-_p4_cmd_counter() {
+(( $+functions[_perforce_cmd_counter] )) ||
+_perforce_cmd_counter() {
_arguments -s : \
'-d[delete counter]' \
'-f[force setting of internal counter]' \
- '1:counter:_p4_counters' \
- '(-d)2::numeric value:_p4_counter_value'
+ '1:counter:_perforce_counters' \
+ '(-d)2::numeric value:_perforce_counter_value'
}
-(( $+functions[_p4_cmd_counters] )) ||
-_p4_cmd_counters() {
+(( $+functions[_perforce_cmd_counters] )) ||
+_perforce_cmd_counters() {
# No arguments
_arguments -s :
}
-(( $+functions[_p4_cmd_delete] )) ||
-_p4_cmd_delete() {
+(( $+functions[_perforce_cmd_delete] )) ||
+_perforce_cmd_delete() {
_arguments -s : \
- '-c[select changelist for deletion]:changelist:_p4_changelist -tp' \
- '*::file:_p4_files'
+ '-c[select changelist for deletion]:changelist:_perforce_changelist -tp' \
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_depot] )) ||
-_p4_cmd_depot() {
+(( $+functions[_perforce_cmd_depot] )) ||
+_perforce_cmd_depot() {
_arguments -s : \
'-d[delete depot]' \
'-o[print to stdout]' \
'-i[read name from stdin]' \
- '(-i)*::depot name:_p4_depots'
+ '(-i)*::depot name:_perforce_depots'
}
-(( $+functions[_p4_cmd_depots] )) ||
-_p4_cmd_depots() {
+(( $+functions[_perforce_cmd_depots] )) ||
+_perforce_cmd_depots() {
# No arguments
_arguments -s :
}
-(( $+functions[_p4_cmd_describe] )) ||
-_p4_cmd_describe() {
+(( $+functions[_perforce_cmd_describe] )) ||
+_perforce_cmd_describe() {
_arguments -s : \
'-d-[select diff option]:diff option:((b\:ignore\ blanks c\:context n\:RCS s\:summary u\:unified w\:ignore\ all\ whitespace))' \
'-s[short form]' \
- '*::changelist:_p4_changelist'
+ '*::changelist:_perforce_changelist'
}
-(( $+functions[_p4_cmd_diff] )) ||
-_p4_cmd_diff() {
+(( $+functions[_perforce_cmd_diff] )) ||
+_perforce_cmd_diff() {
local limit
[[ ${words[(I)-(f|sd|se)]} -eq 0 ]] && limit=" -to"
_arguments -s : \
@@ -1120,275 +1120,275 @@ _p4_cmd_diff() {
'(-sa -sd -sr)-se[unopened files, different]' \
'(-sa -sd -se)-sr[opened files, same as depot]' \
'-t[include non-text files]' \
- "*::file:_p4_files$limit"
+ "*::file:_perforce_files$limit"
}
-(( $+functions[_p4_cmd_diff2] )) ||
-_p4_cmd_diff2() {
+(( $+functions[_perforce_cmd_diff2] )) ||
+_perforce_cmd_diff2() {
_arguments -s : \
- '-b[specify branch view]:branch name:_p4_branches' \
+ '-b[specify branch view]:branch name:_perforce_branches' \
'-d-[select diff option]:diff option:((b\:ignore\ blanks c\:context n\:RCS s\:summary u\:unified w\:ignore\ all\ whitespace))' \
'-q[only list different files]' \
'-t[include non-text files]' \
'-u[use patch-friendly output]' \
- '1::first file:_p4_files' \
- '2::second file:_p4_files'
+ '1::first file:_perforce_files' \
+ '2::second file:_perforce_files'
}
-(( $+functions[_p4_cmd_dirs] )) ||
-_p4_cmd_dirs() {
+(( $+functions[_perforce_cmd_dirs] )) ||
+_perforce_cmd_dirs() {
_arguments -s : \
'-C[only dirs on current client]' \
'-D[include dirs with deleted files]' \
'-H[only dirs on the `have'\'' list]' \
- '*::directory:_p4_files -td'
+ '*::directory:_perforce_files -td'
}
-(( $+functions[_p4_cmd_edit] )) ||
-_p4_cmd_edit() {
+(( $+functions[_perforce_cmd_edit] )) ||
+_perforce_cmd_edit() {
_arguments -s : \
- '-c[set changelist for edit]:changelist:_p4_changelist -tp' \
- '-t[set filetype]:filetype:_p4_filetypes' \
- '*::file:_p4_files'
+ '-c[set changelist for edit]:changelist:_perforce_changelist -tp' \
+ '-t[set filetype]:filetype:_perforce_filetypes' \
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_filelog] )) ||
-_p4_cmd_filelog() {
+(( $+functions[_perforce_cmd_filelog] )) ||
+_perforce_cmd_filelog() {
_arguments -s : \
'-i[follow branches]' \
'-l[long output, full changelist text]' \
'-m[set maximum number of revisions to show]:max revisions: ' \
'-t[include time with date]' \
- '*::file:_p4_files'
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_files] )) ||
-_p4_cmd_files() {
+(( $+functions[_perforce_cmd_files] )) ||
+_perforce_cmd_files() {
_arguments -s : \
'-a[display all revisions in given range]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_fix] )) ||
-_p4_cmd_fix() {
+(( $+functions[_perforce_cmd_fix] )) ||
+_perforce_cmd_fix() {
_arguments -s : \
'-d[delete the fix]' \
- '-s[set job status]:status:_p4_status' \
+ '-s[set job status]:status:_perforce_status' \
'1::-c required:(-c)' \
- '2::changelist:_p4_changelist' \
- '3::job:_p4_jobs'
+ '2::changelist:_perforce_changelist' \
+ '3::job:_perforce_jobs'
}
-(( $+functions[_p4_cmd_fixes] )) ||
-_p4_cmd_fixes() {
+(( $+functions[_perforce_cmd_fixes] )) ||
+_perforce_cmd_fixes() {
_arguments -s : \
'-i[include integrated changelists]' \
- '-j[select by job]:job:_p4_jobs' \
- '-c[select by changelist]:changelist:_p4_changelist' \
- '*::fixed file:_p4_files -tR'
+ '-j[select by job]:job:_perforce_jobs' \
+ '-c[select by changelist]:changelist:_perforce_changelist' \
+ '*::fixed file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_flush] )) ||
-_p4_cmd_flush() {
+(( $+functions[_perforce_cmd_flush] )) ||
+_perforce_cmd_flush() {
_arguments -s : \
'-f[force resynchronisation]' \
'-n[show operations but don'\''t perform them]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_fstat] )) ||
-_p4_cmd_fstat() {
+(( $+functions[_perforce_cmd_fstat] )) ||
+_perforce_cmd_fstat() {
_arguments -s : \
- '-c+[select by changelist]:changelist:_p4_changelist -ts' \
+ '-c+[select by changelist]:changelist:_perforce_changelist -ts' \
'-C[select mapped files]' \
'-H[select synced files]' \
'-W[select opened files]' \
'-l[include fileSize, possibly slow]' \
'-P[output clientFile in full Perforce syntax]' \
'-s[shorten, no client-related data]' \
- '*::file:_p4_files'
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_group] )) ||
-_p4_cmd_group() {
+(( $+functions[_perforce_cmd_group] )) ||
+_perforce_cmd_group() {
_arguments -s : \
'-d[delete group]' \
'-o[output to stdout]' \
'-i[read from stdin]' \
- '1::perforce group:_p4_groups'
+ '1::perforce group:_perforce_groups'
}
-(( $+functions[_p4_cmd_groups] )) ||
-_p4_cmd_groups() {
+(( $+functions[_perforce_cmd_groups] )) ||
+_perforce_cmd_groups() {
_arguments -s : \
'1::user name:_users'
}
-(( $+functions[_p4_cmd_have] )) ||
-_p4_cmd_have() {
- _p4_files
+(( $+functions[_perforce_cmd_have] )) ||
+_perforce_cmd_have() {
+ _perforce_files
}
-(( $+functions[_p4_cmd_help] )) ||
-_p4_cmd_help() {
+(( $+functions[_perforce_cmd_help] )) ||
+_perforce_cmd_help() {
local hline
- if (( ! ${#_p4_help_list} )); then
- (( ${+_p4_help_list} )) || typeset -ga _p4_help_list
+ if (( ! ${#_perforce_help_list} )); then
+ (( ${+_perforce_help_list} )) || typeset -ga _perforce_help_list
# All commands have help.
- _p4_help_list=($_p4_cmd_list)
+ _perforce_help_list=($_perforce_cmd_list)
_call_program help p4 help | while read -A hline; do
if [[ $hline[1] = p4 && $hline[2] = help ]]; then
- _p4_help_list+=("$hline[3]:${hline[4,-1]}")
+ _perforce_help_list+=("$hline[3]:${hline[4,-1]}")
fi
done
fi
- _describe -t help-options 'Perforce help option' _p4_help_list
+ _describe -t help-options 'Perforce help option' _perforce_help_list
}
-(( $+functions[_p4_cmd_info] )) ||
-_p4_cmd_info() {
+(( $+functions[_perforce_cmd_info] )) ||
+_perforce_cmd_info() {
# No arguments
_arguments -s :
}
-(( $+functions[_p4_cmd_integrate] )) ||
-_p4_cmd_integrate() {
+(( $+functions[_perforce_cmd_integrate] )) ||
+_perforce_cmd_integrate() {
local range
# If -s is present, the first normal argument can't have revRange.
[[ ${words[(I)-s]} -eq 0 ]] && range=" -tR"
_arguments -s : \
- '-b[select branch]:branch:_p4_branches' \
- '-c[select changelist for integration]:changelist:_p4_changelist -tp' \
+ '-b[select branch]:branch:_perforce_branches' \
+ '-c[select changelist for integration]:changelist:_perforce_changelist -tp' \
'-f[force reintegration]' \
'-d[reintegrated deleted files]' \
'-h[integrate to revision had on client]' \
'-i[integrate if no common file base]' \
'-n[no action, dummy run]' \
'-r[reverse direction of integration with branch]' \
- '-s[select source]:source file:_p4_files -tR' \
+ '-s[select source]:source file:_perforce_files -tR' \
'-t[propagate type changes]' \
'-v[leave newly branched files uncopied till sync]' \
- "1:file:_p4_files$range" \
- '*::file:_p4_files'
+ "1:file:_perforce_files$range" \
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_integrated] )) ||
-_p4_cmd_integrated() {
- _p4_files -ti
+(( $+functions[_perforce_cmd_integrated] )) ||
+_perforce_cmd_integrated() {
+ _perforce_files -ti
}
-(( $+functions[_p4_cmd_job] )) ||
-_p4_cmd_job() {
+(( $+functions[_perforce_cmd_job] )) ||
+_perforce_cmd_job() {
_arguments -s : \
'(-d -o -i)-f[force setting of readonly fields]' \
'(-f -o -i)-d[delete job]' \
'(-f -d -i)-o[print to stdout]' \
'(-d -o)-i[read from stdin]' \
- '(-i)1::job:_p4_jobs'
+ '(-i)1::job:_perforce_jobs'
}
-(( $+functions[_p4_cmd_jobs] )) ||
-_p4_cmd_jobs() {
+(( $+functions[_perforce_cmd_jobs] )) ||
+_perforce_cmd_jobs() {
_arguments -s : \
- '-e[select by jobview]:jobview:_p4_jobview' \
+ '-e[select by jobview]:jobview:_perforce_jobview' \
'-i[included integrated changes]' \
'-l[long output, full job descriptions]' \
'-r[reverse order of job names]' \
'-m[limit to most recent N jobs]:most recent jobs: ' \
'(-e -i -l -m)-R[]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_jobspec] )) ||
-_p4_cmd_jobspec() {
+(( $+functions[_perforce_cmd_jobspec] )) ||
+_perforce_cmd_jobspec() {
_arguments -s : \
'-i[read form from stdin]' \
'-o[write form from to stdout]'
}
-(( $+functions[_p4_cmd_label] )) ||
-_p4_cmd_label() {
+(( $+functions[_perforce_cmd_label] )) ||
+_perforce_cmd_label() {
_arguments -s : \
'-f[force operation]' \
'-t+[copy template]:template: ' \
'(-o -i -t)-d[delete label]' \
'(-d -f -i)-o[write to standard output]' \
'(-o -d -t)-i[read from standard input]' \
- '*::label:_p4_labels'
+ '*::label:_perforce_labels'
}
-(( $+functions[_p4_cmd_labels] )) ||
-_p4_cmd_labels() {
+(( $+functions[_perforce_cmd_labels] )) ||
+_perforce_cmd_labels() {
_arguments -s : \
- '1::file or revisions which must contain label:_p4_files -tR'
+ '1::file or revisions which must contain label:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_labelsync] )) ||
-_p4_cmd_labelsync() {
+(( $+functions[_perforce_cmd_labelsync] )) ||
+_perforce_cmd_labelsync() {
_arguments -s : \
'-a[add files to label]' \
'-d[delete files from label]' \
'-n[no effect, dummy run]' \
- '-l[specify lable]:label:_p4_labels' \
- '*::file:_p4_files -tR'
+ '-l[specify lable]:label:_perforce_labels' \
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_lock] )) ||
-_p4_cmd_lock() {
+(( $+functions[_perforce_cmd_lock] )) ||
+_perforce_cmd_lock() {
_arguments -s : \
- '-c[select by changelist]:changelist:_p4_changelist -tp' \
- '*::file:_p4_files -to'
+ '-c[select by changelist]:changelist:_perforce_changelist -tp' \
+ '*::file:_perforce_files -to'
}
-(( $+functions[_p4_cmd_logger] )) ||
-_p4_cmd_logger() {
+(( $+functions[_perforce_cmd_logger] )) ||
+_perforce_cmd_logger() {
_arguments -s : \
'-c[limit by counter no]:number: ' \
- '-t[use counter instead of logger]:counter:_p4_counters'
+ '-t[use counter instead of logger]:counter:_perforce_counters'
}
-(( $+functions[_p4_cmd_obliterate] )) ||
-_p4_cmd_obliterate() {
+(( $+functions[_perforce_cmd_obliterate] )) ||
+_perforce_cmd_obliterate() {
_message "obliterate is dangerous: you're on your own here."
}
-(( $+functions[_p4_cmd_opened] )) ||
-_p4_cmd_opened() {
+(( $+functions[_perforce_cmd_opened] )) ||
+_perforce_cmd_opened() {
_arguments -s : \
'-a[list for all clients]' \
- '-c+[select by changelist]:changelist:_p4_changelist -tp' \
- '*::file:_p4_files -to'
+ '-c+[select by changelist]:changelist:_perforce_changelist -tp' \
+ '*::file:_perforce_files -to'
}
-(( $+functions[_p4_cmd_passwd] )) ||
-_p4_cmd_passwd() {
+(( $+functions[_perforce_cmd_passwd] )) ||
+_perforce_cmd_passwd() {
_arguments -s : : \
'-O[explicit old password]:old password: ' \
'-P[explicit new password]:new password: ' \
@@ -1396,35 +1396,35 @@ _p4_cmd_passwd() {
}
-(( $+functions[_p4_cmd_print] )) ||
-_p4_cmd_print() {
+(( $+functions[_perforce_cmd_print] )) ||
+_perforce_cmd_print() {
_arguments -s : \
'-a[display all revisions in a range]' \
'-o[Select output file]:output file:_files' \
'-q[Suppress header]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_protect] )) ||
-_p4_cmd_protect() {
+(( $+functions[_perforce_cmd_protect] )) ||
+_perforce_cmd_protect() {
_arguments -s : \
'-o[write spec to stdout]' \
'-i[read spec from stdin]'
}
-(( $+functions[_p4_cmd_reopen] )) ||
-_p4_cmd_reopen() {
+(( $+functions[_perforce_cmd_reopen] )) ||
+_perforce_cmd_reopen() {
_arguments -s : \
- '-c+[select changelist to reopen on]:changelist:_p4_changelist -tp' \
- '-t+[set file type]:file type:_p4_filetypes' \
- '*::file:_p4_files -to'
+ '-c+[select changelist to reopen on]:changelist:_perforce_changelist -tp' \
+ '-t+[set file type]:file type:_perforce_filetypes' \
+ '*::file:_perforce_files -to'
}
-(( $+functions[_p4_cmd_resolve] )) ||
-_p4_cmd_resolve() {
+(( $+functions[_perforce_cmd_resolve] )) ||
+_perforce_cmd_resolve() {
_arguments -s : \
'-a-[select automatic merge type]:automation type:((f\:force\ acceptance m\:skip\ conflicts s\:safe t\:use\ theirs y\:use\ yours))' \
'-d-[select diff option]:diff option:((b\:ignore\ blanks w\:ignore\ all\ whitespace))' \
@@ -1432,99 +1432,99 @@ _p4_cmd_resolve() {
'-n[no action, just list]' \
'-t[force textual merge on binary files]' \
'-v[verbose, mark all changes]' \
- '*::file:_p4_files -to'
+ '*::file:_perforce_files -to'
}
-(( $+functions[_p4_cmd_resolved] )) ||
-_p4_cmd_resolved() {
- _p4_files -tr
+(( $+functions[_perforce_cmd_resolved] )) ||
+_perforce_cmd_resolved() {
+ _perforce_files -tr
}
-(( $+functions[_p4_cmd_revert] )) ||
-_p4_cmd_revert() {
+(( $+functions[_perforce_cmd_revert] )) ||
+_perforce_cmd_revert() {
_arguments -s : \
'-a[revert unaltered files]' \
- '-c[limit reversions to changelist]:changelist:_p4_changelist -tp' \
+ '-c[limit reversions to changelist]:changelist:_perforce_changelist -tp' \
'-n[no action, show effect only]' \
- '*::file:_p4_files -to'
+ '*::file:_perforce_files -to'
}
-(( $+functions[_p4_cmd_review] )) ||
-_p4_cmd_review() {
+(( $+functions[_perforce_cmd_review] )) ||
+_perforce_cmd_review() {
_arguments -s : \
- '-c[select changelist for counter]:changelist:_p4_changelist -ts' \
- '-t[limit change number by counter]:counter:_p4_counters'
+ '-c[select changelist for counter]:changelist:_perforce_changelist -ts' \
+ '-t[limit change number by counter]:counter:_perforce_counters'
}
-(( $+functions[_p4_cmd_reviews] )) ||
-_p4_cmd_reviews() {
+(( $+functions[_perforce_cmd_reviews] )) ||
+_perforce_cmd_reviews() {
_arguments -s : \
- '-c[show users by changelist]:changelist:_p4_changelist -ts' \
- '*::file:_p4_files'
+ '-c[show users by changelist]:changelist:_perforce_changelist -ts' \
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_set] )) ||
-_p4_cmd_set() {
+(( $+functions[_perforce_cmd_set] )) ||
+_perforce_cmd_set() {
# Only works under Windoze but maybe we are on Cygwin.
_arguments -s : \
'-s[set for whole system]' \
'-S[set for specified service]:service: ' \
- "*::environment variable:_p4_variables"
+ "*::environment variable:_perforce_variables"
}
-(( $+functions[_p4_cmd_submit] )) ||
-_p4_cmd_submit() {
+(( $+functions[_perforce_cmd_submit] )) ||
+_perforce_cmd_submit() {
_arguments -s : \
'-r[files open for add or edit remain open]' \
'-s[include fix status in list]' \
- '(-s -i)-c[submit specific change]:changelist:_p4_changelist -tp' \
+ '(-s -i)-c[submit specific change]:changelist:_perforce_changelist -tp' \
'(-c)-i[read changelist spec from stdin]' \
- '*::file:_p4_files -to -tr' \
+ '*::file:_perforce_files -to -tr' \
}
-(( $+functions[_p4_cmd_sync] )) ||
-_p4_cmd_sync() {
+(( $+functions[_perforce_cmd_sync] )) ||
+_perforce_cmd_sync() {
_arguments -s : \
'-f[force resynchronisation]' \
'-n[show operations but don'\''t perform them]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_triggers] )) ||
-_p4_cmd_triggers() {
+(( $+functions[_perforce_cmd_triggers] )) ||
+_perforce_cmd_triggers() {
_arguments -s : \
'-o[output form to stdout]' \
'-i[read from from stdin]'
}
-(( $+functions[_p4_cmd_typemap] )) ||
-_p4_cmd_typemap() {
+(( $+functions[_perforce_cmd_typemap] )) ||
+_perforce_cmd_typemap() {
_arguments -s : \
'-o[output table to stdout]' \
'-i[read table from stdin]'
}
-(( $+functions[_p4_cmd_unlock] )) ||
-_p4_cmd_unlock() {
+(( $+functions[_perforce_cmd_unlock] )) ||
+_perforce_cmd_unlock() {
_arguments -s : \
- '-c[non-default changelist to unlock]:changelist:_p4_changelist -tp' \
+ '-c[non-default changelist to unlock]:changelist:_perforce_changelist -tp' \
'-f[allow superuser to unlock any file]' \
- '*::file:_p4_files'
+ '*::file:_perforce_files'
}
-(( $+functions[_p4_cmd_user] )) ||
-_p4_cmd_user() {
+(( $+functions[_perforce_cmd_user] )) ||
+_perforce_cmd_user() {
_arguments -s : \
'(-o)-f[force edit by superuser]' \
'(-o -i)-d[delete user]' \
@@ -1534,27 +1534,27 @@ _p4_cmd_user() {
}
-(( $+functions[_p4_cmd_users] )) ||
-_p4_cmd_users() {
+(( $+functions[_perforce_cmd_users] )) ||
+_perforce_cmd_users() {
_arguments -s : \
'*::username:_users'
}
-(( $+functions[_p4_cmd_verify] )) ||
-_p4_cmd_verify() {
+(( $+functions[_perforce_cmd_verify] )) ||
+_perforce_cmd_verify() {
_arguments -s : \
'-q[operate quietly]' \
'-u[compute and save digest if missing]' \
'-v[compute and save all digets]' \
- '*::file:_p4_files -tR'
+ '*::file:_perforce_files -tR'
}
-(( $+functions[_p4_cmd_where] )) ||
-_p4_cmd_where() {
- _p4_files
+(( $+functions[_perforce_cmd_where] )) ||
+_perforce_cmd_where() {
+ _perforce_files
}
-_p4 "$@"
+_perforce "$@"