summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash-completion.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/bash-completion.sh b/bash-completion.sh
new file mode 100644
index 0000000..f3d285a
--- /dev/null
+++ b/bash-completion.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+_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
r handling. The long term solution is to drastically reorganize concurrency code. 2015-01-13Handle being given numbers as feed nameAntonio Terceiro2-0/+16 Force feed names to be strings because they will be handled as strings later. 2015-01-13Rakefile: remove wrong (and thus unused) flagAntonio Terceiro1-1/+0 2015-01-13Remove deprecated 'test suite' fileAntonio Terceiro1-12/+0 I want to always run all tests 2015-01-13Rakefile: re-indentAntonio Terceiro1-35/+35 2015-01-13Rakefile: run tests in verbose modeAntonio Terceiro1-1/+2 2014-10-071.2.3 releaseAntonio Terceiro1-1/+1 2014-10-07Fix cleanup of maildirsAntonio Terceiro3-1/+16 Thanks to Sylvain L. Sauvage for the bug report 2014-05-18feed2imap-test: reuse cache dir/protect configAntonio Terceiro1-1/+1 this reduces the noise in the output and helps testing feed updates 2014-02-13feed2imap-test: can now take a feed URL as argumentAntonio Terceiro1-3/+22 2014-02-13update .gitignoreAntonio Terceiro1-0/+2 2014-02-13fix dependency on ruby-feedparserAntonio Terceiro1-1/+1 2014-02-05Release 1.2.2Antonio Terceiro2-2/+2 2014-02-05config: fix regression with arrays as targetAntonio Terceiro2-1/+17 2013-08-28Fix teardown method nameAntonio Terceiro1-1/+1