1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
# (C) 2012-2025 magicant
# Completion script for the "git" command.
# Supports Git 2.48.1.
function completion/git-name-rev {
WORDS=(git name-rev "${WORDS[2,-1]}")
command -f completion//reexecute
}
function completion/git::name-rev:arg {
OPTIONS=( #>#
"--all; print all commits reachable from any refs"
"--always; show uniquely abbreviated commit object as fallback"
"--exclude:; do not consider refs matching the given glob"
"--name-only; don't print SHA-1 before each name"
"--no-exclude; cancel all previous --exclude options"
"--no-undefined; exit with non-zero status for an undefined reference"
"--refs:; specify refs that should be used by a pattern"
"--annotate-stdin --stdin; filter the standard input, appending a name to each SHA-1"
"--tags; use tag names only"
) #<#
command -f completion//parseoptions -n
case $ARGOPT in
(-)
command -f completion//completeoptions
;;
(*)
command -f completion/git::completeref
;;
esac
}
# vim: set ft=sh ts=8 sts=8 sw=8 et:
|