summaryrefslogtreecommitdiff
path: root/contrib/pass.bash-completion
blob: 8ddc37700ad991f1d579e89103d966cc3a03731a (plain)
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
# completion file for bash

# (C) Copyright 2012 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
# This is released under the GPLv2+. Please see COPYING for more information.

_pass()
{
	local cur prev prefix suffix gen
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"
	prefix="$HOME/.password-store/"
	suffix=".gpg"

	if [[ $prev == --* ]]; then
		return 0
	fi
	
	for item in $(compgen -f $prefix$cur); do
		if [[ $item == $prefix.* ]]; then
			continue
		fi
		if [[ -d $item ]]; then
			item="$item/"
		fi
		item="${item%$suffix}"
		gen="$gen ${item#$prefix}"
	done

	COMPREPLY=( $gen )
}
complete -o filenames -o nospace -F _pass pass
2aef1cbc7a&follow=1'>Add list_cc_flags -- with commentsRené 'Necoro' Neumann1-0/+2 2011-03-13Add list_cc_flagsRené 'Necoro' Neumann1-0/+23 2011-03-13Enhanced the open_ebuild functionRené 'Necoro' Neumann1-6/+29 2011-03-13make menc() more verboseRené 'Necoro' Neumann1-0/+5 2011-03-13Better 'cci' outputRené 'Necoro' Neumann1-0/+2 2011-03-13Add function to mount encrypted thingiesRené 'Necoro' Neumann1-0/+11 2011-03-13Make 'Y' behave correctly in vimRené 'Necoro' Neumann1-0/+3 2011-02-10backward-kill-wordRené 'Necoro' Neumann1-0/+3 2011-02-10Fix zsh versionRené 'Necoro' Neumann1-1/+1