[pass] [PATCH v2] Don't require trailing slash in PASSWORD_STORE_DIR

Florian Margaine florian at margaine.com
Wed Oct 26 14:32:53 CEST 2016


On Wed, 26 Oct 2016 11:42:10 +0200
Florian Margaine <florian at margaine.com> wrote:

> This requirement leads to non-working bash completion in many cases,
> with a lot of head-scratching.
> 
> This issue doesn't exist in fish and zsh where this is already done
> this way.
> ---
>  src/completion/pass.bash-completion | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/completion/pass.bash-completion
> b/src/completion/pass.bash-completion index 456485b..f773d1d 100644
> --- a/src/completion/pass.bash-completion
> +++ b/src/completion/pass.bash-completion
> @@ -5,13 +5,13 @@
>  # This file is licensed under the GPLv2+. Please see COPYING for more
> information. 
>  _pass_complete_entries () {
> -	prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store/}"
> +	prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
>  	prefix="${prefix%/}/"
>  	suffix=".gpg"
>  	autoexpand=${1:-0}
>  
>  	local IFS=$'\n'
> -	local items=($(compgen -f $prefix$cur))
> +	local items=($(compgen -f $prefix/$cur))
>  
>  	# Remember the value of the first item, to see if it is a
> directory. If # it is a directory, then don't add a space to the
> completion

Sorry, this was already fixed in
0ccb898021f8838ba3bc8ed0a256899f9b571a81

Ignore my patches.

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20161026/c35ceb0f/attachment.asc>


More information about the Password-Store mailing list