This commit is contained in:
parent
c449dfcb5f
commit
559939e2f4
49 changed files with 729 additions and 252 deletions
18
.local/share/completions/_gor
Normal file
18
.local/share/completions/_gor
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#compdef gor
|
||||
|
||||
__git_command_successful () {
|
||||
if (( ${#*:#0} > 0 )); then
|
||||
_message 'not a git repository'
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
__git_remotes() {
|
||||
local remotes expl
|
||||
remotes=(${(f)"$(_call_program remotes git remote 2>/dev/null)"})
|
||||
__git_command_successful $pipestatus || return 1
|
||||
_wanted remotes expl remote compadd "$@" -a - remotes
|
||||
}
|
||||
|
||||
_arguments -S $endopt ': :__git_remotes'
|
||||
Loading…
Add table
Add a link
Reference in a new issue