function__fish_print_p4_changelists-d"Reformat output from `p4 changes` to simple format. Specify 'detailed!' as first argument to use username@workspace prefix"
set-ldetailed
iftest-n"$argv"
andtest$argv[1]="detailed!"
setdetailed true
set-eargv[1]
end
# The format of `p4 changes -L` is as follows, for each changelist:
# Change 1234 on YYYY/MM/DD by user@workspace *status*\n
# \n
# \t Description text line\n
# \t Description text another line\n
# \n
set-lchanges(p4 changes -L$argv)
set-lresult
forlinein(string trim -- $changes)
iftest-z"$line"
continue
end
# see output format ^^^
set-lchange_match(string match -ar'^Change ([0-9]+) on [0-9/]+ by (\S+).*$'$line)
function__fish_print_p4_pending_changelists-d"Lists all *pending* changelists. If 'default' argument is provided, default changelist will also be listed"
function__fish_print_p4_file_types-d"Lists all of available file modes"
set-lbase_types text binary symlink apple resource unicode utf16
fortype in$base_types
printf'%s\t%s\n'$type+m 'always set modtime'$type+w 'always writeable'$type+x 'exec bit set'$type+k '$Keyword$ expansion of Id, Header, Author, Date, DateUTC, DateTime, DateTimeUTC, DateTimeTZ, Change, File, Revision'$type+ko '$Keyword$ expansion of Id, Header only'$type+l 'exclusive open: disallow multiple opens'$type+C 'server stores compressed file per revision'$type+D 'server stores deltas in RCS format'$type+F 'server stores full file per revision'$type+S 'server stores only single head rev., or specify number to <n> of revisions'$type+X 'server runs archive trigger to access files'
complete-c p4 -n __fish_p4_not_in_command -s b -x-d'Specifies a batch size (number of arguments) to use when processing a command from a file with the -x argfile option'
complete-c p4 -n __fish_p4_not_in_command -s c -x-d'Overrides any P4CLIENT setting with the specified client name'
complete-c p4 -n __fish_p4_not_in_command -s d -r-d'Overrides any PWD setting (current working directory) and replaces it with the specified directory'
complete-c p4 -n __fish_p4_not_in_command -s I -d'Specify that progress indicators, if available, are desired. This option is not compatible with the -s and -G options'
complete-c p4 -n __fish_p4_not_in_command -s G -d'Causes all output (and batch input for form commands with -i) to be formatted as marshalled Python dictionary objects'
complete-c p4 -n __fish_p4_not_in_command -s H -x-a'(__fish_print_hostnames)'-d'Overrides any P4HOST setting and replaces it with the specified hostname'
complete-c p4 -n __fish_p4_not_in_command -s p -x-d'Overrides any P4PORT setting with the specified protocol:host:port'
complete-c p4 -n __fish_p4_not_in_command -s P -x-d'Overrides any P4PASSWD setting with the specified password.'
complete-c p4 -n __fish_p4_not_in_command -s r -x-d'Specifies the number of times to retry a command (notably, p4 sync) if the network times out.'
complete-c p4 -n __fish_p4_not_in_command -s s -d'Prepends a descriptive field (for example, text:, info:, error:, exit:) to each line of output produced by a Perforce command. This is most often used when scripting.'
complete-c p4 -n __fish_p4_not_in_command -s u -x-a'(__fish_print_p4_users)'-d'Overrides any P4USER, USER, or USERNAME setting with the specified user name.'
complete-c p4 -n __fish_p4_not_in_command -s x -r-d'Instructs Perforce to read arguments, one per line, from the specified file. If file is a single hyphen (-), then standard input is read.'
complete-c p4 -n __fish_p4_not_in_command -s C -x-a'(__fish_print_encodings)'-d'Overrides any P4CHARSET setting with the specified character set.'
complete-c p4 -n __fish_p4_not_in_command -s Q -x-a'(__fish_print_encodings)'-d'Overrides any P4COMMANDCHARSET setting with the specified character set.'
complete-c p4 -n __fish_p4_not_in_command -s L -x-d'This feature is reserved for system integrators.'
complete-c p4 -n __fish_p4_not_in_command -s z -x-d'Causes output of many reporting commands to be in the same tagged format as that generated by p4 fstat.'
complete-c p4 -n __fish_p4_not_in_command -s q -d'Quiet mode; suppress all informational message and report only warnings or errors.'
complete-c p4 -n __fish_p4_not_in_command -s V -d'Displays the version of the p4 application and exits.'
complete-c p4 -n __fish_p4_not_in_command -s h -d'Displays basic usage information and exits.'
__fish_p4_register_command_option clean -s a -d"Added files: Find files in the workspace that have no corresponding files in the depot and delete them"
__fish_p4_register_command_option clean -s d -d"Deleted files: Find those files in the depot that do not exist in your workspace and add them to the workspace"
__fish_p4_register_command_option clean -s e -d"Edited files: Find files in the workspace that have been modified and restore them to the last file version that has synced from the depot"
__fish_p4_register_command_option clean -s I -d"Do not perform any ignore checking; ignore any settings specified by P4IGNORE for added files"
__fish_p4_register_command_option clean -s l -d"Display output in local file syntax with relative paths, similar to the workspace-centric view of p4 status"
__fish_p4_register_command_option clean -s n -d"Preview the results of the operation without performing any action"
# client, workspace @TODO: -Fs (only in -f), -c (only in -S stream)
__fish_p4_register_command_option$a-s f -d"Allows the last modification date, which is normally read-only, to be set"
__fish_p4_register_command_option$a-s d -f-a'(__fish_print_p4_workspaces)'-d"Delete the specified client workspace whether or not the workspace is owned by the user"
# __fish_p4_register_command_option $a -a '-Fs' -d 'Deletes client with shelves (must follow -f)'
__fish_p4_register_command_option$a-s o -d"Write the client workspace spec to standard output"
__fish_p4_register_command_option$a-s i -d"Read the client workspace spec from standard input"
__fish_p4_register_command_option$a-s c -x-a'(__fish_print_p4_workspace_changelists)'-d"When used with -S stream, displays the workspace spec that would have been created for a stream at the moment the change was submitted"
__fish_p4_register_command_option$a-s s -d"Switch workspace view"
__fish_p4_register_command_option$a-s t -x-d"Specify a client workspace Template"
__fish_p4_register_command_option$a-l serverid -x-d"Forcefully delete workspace that is bound to another server"
__fish_p4_register_command_option$a-s S -x-a'(__fish_print_p4_streams)'-d"Associates the workspace with the specified stream"
end
# clients, workspaces @TODO -U and others are mutually exclusive
__fish_p4_register_command_option$a-s a -d"List all client workspaces, not just workspaces bound to this server"
__fish_p4_register_command_option$a-s e -x-d"List only client workspaces matching filter (case-sensitive)"
__fish_p4_register_command_option$a-s E -x-d"List only client workspaces matching filter (case-insensitive)"
__fish_p4_register_command_option$a-s m -x-d"List only the first max client workspaces"
__fish_p4_register_command_option$a-s s -x-d"List only client workspaces bound to the specified serverID. On an edge server, the -s option defaults to the edge server’s serverID"
__fish_p4_register_command_option$a-s S -x-a'(__fish_print_p4_streams)'-d"List client workspaces associated with the specified stream"
__fish_p4_register_command_option$a-s t -d"Display the time as well as the date of the last update to the workspace"
__fish_p4_register_command_option$a-s u -x-a'(__fish_print_p4_users)'-d"List only client workspaces owned by user"
__fish_p4_register_command_option$a-s U -d"List only client workspaces unloaded with p4 unload"
end
# flush @TODO
# have @TODO
# ignores @TODO
# sync @TODO --parallel has unique key-value pair syntax: --parallel=optq1=n,opt2=n,opt3=n,opt4=n
__fish_p4_register_command_option sync -s f -d"Force sync, overwrite all unopened files"
__fish_p4_register_command_option sync -s k -d"Keep existing workspace files, alias for p4 flush"
__fish_p4_register_command_option sync -s L -d"perform the sync on a list of valid file arguments in full depot syntax with a valid revision number"
__fish_p4_register_command_option sync -s m -x-d"Sync only the first max files specified"
__fish_p4_register_command_option sync -s n -d"Preview mode: Display the results of the sync without actually syncing"
__fish_p4_register_command_option add -s c -x-a'(__fish_print_p4_pending_changelists default)'-d"Changelist number"
__fish_p4_register_command_option add -s d -d"Revert and re-add"
__fish_p4_register_command_option add -s f -d"Use wildcard characters for files"
__fish_p4_register_command_option add -s I -d"Do not use P4IGNORE"
__fish_p4_register_command_option add -s n -d"Preview operation, don't change files"
__fish_p4_register_command_option add -s t -x-a'(__fish_print_p4_file_types)'-d"File type"
# attribute @TODO
# copy @TODO
# delete @TODO
# diff @TODO
# diff2 @TODO
# dirs @TODO
# edit
__fish_p4_register_command_option edit -s c -x-a'(__fish_print_p4_pending_changelists default)'-d"Changelist number"
__fish_p4_register_command_option edit -s k -d"Keep existing workspace files; mark the file as open for edit even if the file is not in the client view"
__fish_p4_register_command_option edit -s n -d"Preview operation, don't change files"
__fish_p4_register_command_option edit -s t -x-a'(__fish_print_p4_file_types)'-d"File type"
__fish_p4_register_command_option$a-s s -d"Allows jobs to be assigned arbitrary status values on submission of the changelist, rather than the default status of closed"
__fish_p4_register_command_option$a-s f -d"Force operation (The -u and the -f options are mutually exclusive)"
__fish_p4_register_command_option$a-s u -d"Update a submitted changelist (The -u and the -f options are mutually exclusive)"
__fish_p4_register_command_option$a-s O -x-a'(__fish_print_p4_pending_changelists)'-d"Changelist number"
__fish_p4_register_command_option$a-s d -x-a'(__fish_print_p4_pending_changelists)'-d"Delete a changelist"
__fish_p4_register_command_option$a-s o -d"Writes the changelist spec to standard output"
__fish_p4_register_command_option$a-s i -d"Read the changelist spec from standard input"
__fish_p4_register_command_option$a-s t -x-a"restricted public"-d"Modifies the 'Type' of the change"
__fish_p4_register_command_option$a-s U -x-a'(__fish_print_p4_users)'-d"Changes the 'User' of the change"
__fish_p4_register_command_option shelve -s a -x-a'submitunchanged leaveunchanged'-d"Options: 'submitunchanged' shelves all files, 'leaveunchanged' shelves only changed files"
__fish_p4_register_command_option shelve -s c -x-a'(__fish_print_p4_pending_changelists)'-d"Changelist number"
__fish_p4_register_command_option shelve -s d -d'Discard the shelved files'
__fish_p4_register_command_option shelve -s f -d'Force overwrite of shelved files'
__fish_p4_register_command_option shelve -s i -d'Read a changelist description from standard input'
__fish_p4_register_command_option shelve -s p -d"Promote a shelved change from an Edge server to a Commit server"
__fish_p4_register_command_option shelve -s r -d'Replace all shelved files in the changelist with the files that are opened in your workspace'
__fish_p4_register_command_option$a-s b -x-a'(__fish_print_p4_branches)'-d"Integrate the files using the sourceFile/targetFile mappings included in the branch view of branchname. If the toFiles argument is included, include only those target files in the branch view that match the pattern specified by toFiles"
__fish_p4_register_command_option$a-s n -d"Display the integrations this command would perform without actually performing them"
__fish_p4_register_command_option$a-s v -d"Open files for branching without copying toFiles into the client workspace"
__fish_p4_register_command_option$a-s c -x-a'(__fish_print_p4_pending_changelists)'-d"Open the toFiles for branch, integrate, or delete in the specified pending changelist"
__fish_p4_register_command_option$a-a-Di-d"f the source file has been deleted and re-added, revisions that precede the deletion will be considered to be part of the same source file"
__fish_p4_register_command_option$a-s f -d"Force the integration on all revisions of fromFile and toFile, even if some revisions have been integrated in the past"
__fish_p4_register_command_option$a-s h -d"Use the have revision"
__fish_p4_register_command_option$a-s O -x-a'(__fish_print_p4_integrate_output_options)'-d"Specify output options"
__fish_p4_register_command_option$a-s m -x-d"Limit the command to integrating only the first N files"
__fish_p4_register_command_option$a-s R -x-a'(__fish_print_p4_integrate_resolve_options)'-d"Specify resolve options"
__fish_p4_register_command_option$a-s s -r-d"Source file and revision"
__fish_p4_register_command_option$a-s r -r-d"Reverse the mappings in the branch view, integrating from the target files to the source files"
__fish_p4_register_command_option$a-s S -x-a'(__fish_print_p4_streams)'-d"Source stream"
__fish_p4_register_command_option$a-s P -x-a'(__fish_print_p4_streams)'-d"Custom parent stream"
end
# integrated @TODO
# interchanges @TODO
# istat @TODO
# label @TODO
# labels @TODO
# labelsync @TODO
# list @TODO
# merge @TODO
# populate @TODO
# tag @TODO
# resolve
__fish_p4_register_command_option resolve -s a -x-a'(__fish_print_p4_resolve_options a)'-d"Resolve automatically"
__fish_p4_register_command_option resolve -s A -x-a'(__fish_print_p4_resolve_options A)'-d"Constrain the type of resolve to branching, deletion, file type change, or move/rename"
__fish_p4_register_command_option resolve -s d -x-a'(__fish_print_p4_resolve_options d)'-d"Ignore specified differences in whitespace or line-ending convention"
__fish_p4_register_command_option resolve -s f -d"Allow already resolved, but not yet submitted, files to be resolved again"
__fish_p4_register_command_option resolve -s n -d"List the files that need resolving without actually performing the resolve"
__fish_p4_register_command_option resolve -s N -d"Preview the operation with additional information about any non-content resolve actions that are scheduled"
__fish_p4_register_command_option resolve -s o -d"Output the base file name and revision to be used during the resolve"
__fish_p4_register_command_option resolve -s t -d"Force a three-way merge, even on binary (non-text) files"
__fish_p4_register_command_option resolve -s v -d"Include conflict markers in the file for all changes between yours and base, and between theirs and base"
__fish_p4_register_command_option resolve -s c -x-a'(__fish_print_p4_workspace_changelists)'-d"Limit the scope of the resolve operation to the files opened in the specified changelist number"