password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 3439edd8e6e3455c4735b91561372254a3c9fda4
parent 9ec2990e96031e617237ac4881288974a69b7522
Author: Johannes Altmanninger <aclopte@gmail.com>
Date:   Thu, 25 Jun 2020 23:41:09 +0200

fish-completion: force some variables to be script-local

Unfortunately, a command "set x" without explicit scope overwrites the variable
"x" in the innermost scope it is defined in, if any.  This can cause problems
if the user defines the variable "x" as global or universal variable (which is
visible in all fishes).  Make sure to define a local variable so we use that.

Diffstat:
Msrc/completion/pass.fish-completion | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/completion/pass.fish-completion b/src/completion/pass.fish-completion @@ -3,7 +3,7 @@ # Copyright (C) 2012-2014 Dmitry Medvinsky <me@dmedvinsky.name>. All Rights Reserved. # This file is licensed under the GPLv2+. Please see COPYING for more information. -set PROG 'pass' +set -l PROG 'pass' function __fish_pass_get_prefix set -l prefix "$PASSWORD_STORE_DIR" @@ -18,7 +18,7 @@ function __fish_pass_needs_command end function __fish_pass_uses_command - set cmd (commandline -opc) + set -l cmd (commandline -opc) if [ (count $cmd) -gt 1 ] if [ $argv[1] = $cmd[2] ] return 0