Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 64493 | Differences between
and this patch

Collapse All | Expand All

(-)shash/files/shash.bash-completion (+37 lines)
Line 0 Link Here
1
# shash(1) completion.
2
# Copyright 2004 Gentoo Foundation
3
#
4
have shash &&
5
_shash() {
6
	local cur prev
7
8
	COMPREPLY=()
9
	cur=${COMP_WORDS[COMP_CWORD]}
10
	prev=${COMP_WORDS[COMP_CWORD-1]}
11
12
	case "$prev" in
13
	-c|--config)
14
		_filedir
15
		return 0 ;;
16
	-o|--keymode)
17
		COMPREPLY=( $( compgen -W "$( shash --listkeygen | tail -n +2 )" \
18
			-- $cur ) )
19
		return ;;
20
	-a|--algorithm)
21
		COMPREPLY=( $( compgen -W "$( shash --list )" \
22
			-- $cur ) )
23
		return ;;
24
	*)
25
		;;
26
	esac
27
	
28
	COMPREPLY=( $( compgen -W '-V -q -m -d -c -b -t -o -i -a -l -k -h -v \
29
		-L \
30
		--verbose --quiet --nosalt --time --hmac --doublecheck \
31
		--check --binary --text --keymode --config --algorithm \
32
		--list --key --listkeygen --help --version --license' \
33
		-- $cur ) )
34
	_filedir
35
	return 0
36
}
37
[ -n "${have:-}" ] && complete -F _shash $filenames shash
(-)shash/shash-0.2.6.ebuild (+10 lines)
Lines 27-30 src_compile() { Link Here
27
src_install() {
30
src_install() {
28
	make install DESTDIR=${D} || die "install failed"
31
	make install DESTDIR=${D} || die "install failed"
29
	dodoc AUTHORS ChangeLog INSTALL NEWS doc/sample.shashrc doc/FORMAT
32
	dodoc AUTHORS ChangeLog INSTALL NEWS doc/sample.shashrc doc/FORMAT
33
	insinto /usr/share/bash-completion
34
	newins ${FILESDIR}/shash.bash-completion ${PN}
35
}
36
37
pkg_postinst() {
38
	echo
39
	einfo "To enable bash command-line completion for ${PN}, execute"
40
	einfo "the following command as root:"
41
	einfo "  ln -s /usr/share/bash-completion/${PN} /etc/bash_completion.d/"
42
	echo
30
}
43
}

Return to bug 64493