summaryrefslogtreecommitdiff
path: root/contrib/pass.bash-completion
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/pass.bash-completion16
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion
index 71bb12a..a7d0f28 100644
--- a/contrib/pass.bash-completion
+++ b/contrib/pass.bash-completion
@@ -10,15 +10,16 @@ _pass_complete_entries () {
autoexpand=${1:-0}
local IFS=$'\n'
- for item in $(compgen -f $prefix$cur); do
+ local items=($(compgen -f $prefix$cur))
+ for item in ${items[@]}; do
if [[ $item == $prefix.* ]]; then
continue
fi
- # append / to directories and recursively expand single-entry dirs
+ # append / to directories and recursively expand single-entry dir
while [[ -d $item ]]; do
item="$item/"
- if [[ $autoexpand -eq 1 ]]; then
- subitems=($(compgen -f $item))
+ if [[ ${#items[@]} -eq 1 && $autoexpand -eq 1 ]]; then
+ local subitems=($(compgen -f $item))
if [[ ${#subitems[@]} -eq 1 ]]; then
item="${subitems[0]}"
else
@@ -29,11 +30,6 @@ _pass_complete_entries () {
fi
done
item="${item%$suffix}"
- item="${item// /\ }"
- item="${item//'/\'}"
- item="${item//\(/\(}"
- item="${item//)/\)}"
- item="${item//&/\&}"
COMPREPLY+=("${item#$prefix}")
done
}
@@ -79,4 +75,4 @@ _pass()
fi
}
-complete -o nospace -F _pass pass
+complete -o filenames -o nospace -F _pass pass
>-2/+2 2013-10-22Add cwd-spawn to urxvt to allow spawning a new terminal from the currentRené 'Necoro' Neumann3-2/+199 2013-10-22Use chpwd_functions and precmd_functions instead of putting everything inRené 'Necoro' Neumann1-19/+23 2013-09-30urxvt: execute the wgetpaste check each timeRené 'Necoro' Neumann1-2/+5 2013-09-30urxvt: wgetpaste fixRené 'Necoro' Neumann1-4/+4 2013-09-30Allow HOME variable in .Xresources.René 'Necoro' Neumann2-3/+3 2013-09-30wgetpaste support for urxvt.René 'Necoro' Neumann2-1/+28 2013-09-30Urxvt autotransform for <filename>:<line>.René 'Necoro' Neumann1-1/+4 2013-09-30Remove tabbed(x) from urxvt. We use i3 -- no need for it.René 'Necoro' Neumann1-9/+0 2013-09-30Do not display icon in urxvt. It's not supported by i3 anyway.René 'Necoro' Neumann1-1/+1 2013-09-29Remove wrong monitors lineRené 'Necoro' Neumann1-1/+0 2013-09-29Delete vimperator paste plugin -- seems not to work anymore with new FFRené 'Necoro' Neumann1-266/+0 2013-09-29Use $HOST instead of Cauchiy in titleRené 'Necoro' Neumann1-1/+1 2013-09-24Remove herbstluftwmRené 'Necoro' Neumann1-1/+0 2013-09-24Conky changesRené 'Necoro' Neumann2-5/+13 2013-09-15Remove trailing slash from \~ulpRené 'Necoro' Neumann1-1/+1 2013-09-15Make cci explicitly use python2René 'Necoro' Neumann1-1/+1 2013-09-10Node/NPM preparationRené 'Necoro' Neumann3-1/+13