Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions etc/git-extras-completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ __gitex_submodule_names() {
_wanted submodule-names expl submodule-name compadd $* - $submodule_names
}

__gitex_workspace_names() {
local expl
declare -a workspace_names
workspace_names=($(git bulk --listall | awk '{print $1}' | cut -d "." -f 2))
__gitex_command_successful || return
_wanted workspace-names expl workspace-names compadd $* - $workspace_names
}

__gitex_author_names() {
local expl
Expand Down Expand Up @@ -122,6 +129,20 @@ _git-brv() {
'(-r --reverse)'{-r,--reverse}'[reverse order]'
}

_git-bulk() {
_arguments \
'-a[Run a git command on all workspaces and their repositories.]' \
'-g[Ask the user for confirmation on every execution (guarded mode).]' \
'-w[Run the git command on the specified workspace.]:workspace-name:__gitex_workspace_names' \
'-q[Suppress bulk output about current execution (quiet mode).]' \
'--addworkspace[Register a workspace for bulk operations.]' \
'--removeworkspace[Remove the specified workspace.]:workspace-name:__gitex_workspace_names' \
'--addcurrent[Adds the current directory as workspace to git bulk operations]' \
'--purge[Removes all defined repository locations.]' \
'--listall[List all registered repositories.]' \
'--help[Show the help.]'
}

_git-changelog() {
_arguments \
'(-l --list)'{-l,--list}'[list commits]' \
Expand Down
Loading