Use set -l to force use of a local variable

Bare set overwrites a global/universal variable if it exists.
This commit is contained in:
Johannes Altmanninger
2020-05-15 07:56:06 +02:00
parent fe6c76d058
commit 49c5f96470
59 changed files with 152 additions and 146 deletions

View File

@@ -8,7 +8,7 @@ function __fish_complete_gpg_key_id -d 'Complete using gpg key ids' -a __fish_co
case "uid*"
# Extract user ids (note: gpg escapes colons as '\x3a')
set -l __uid (string split ":" -- $garbage)
set uid (string replace -a '\x3a' ':' -- $__uuid[10])
set -l uid (string replace -a '\x3a' ':' -- $__uuid[10])
printf "%s\t%s\n" $keyid $uid
case "pub*"
# Extract key fingerprints (no subkeys)