File: git-name-rev

package info (click to toggle)
yash 2.50-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,036 kB
  • sloc: ansic: 33,211; makefile: 839; sh: 477; sed: 16
file content (39 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (5)
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
39
# (C) 2012 magicant

# Completion script for the "git" command.
# Supports Git 1.8.0.2.

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"
	"--name-only; don't print SHA-1 before each name"
	"--no-undefined; exit with non-zero status for an undefined reference"
	"--refs:; specify refs that should be used by a pattern"
	"--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
			;;
		(--refs)
			command -f completion/git::completeref
			;;
		('')
			command -f completion/git::completeref
			;;
	esac

}


# vim: set ft=sh ts=8 sts=8 sw=8 noet: