Fixed creation glitch with multiple GPG IDs
This commit is contained in:
4
vns
4
vns
@@ -233,7 +233,7 @@ vns_create () {
|
|||||||
|
|
||||||
local -r VNS_RED_COLOR='\033[0;31m'
|
local -r VNS_RED_COLOR='\033[0;31m'
|
||||||
local -r VNS_RESET_COLOR='\033[0m'
|
local -r VNS_RESET_COLOR='\033[0m'
|
||||||
|
local -a create_gpgid="($(vns_gpgid))"
|
||||||
if [ "$#" -lt 1 ]; then
|
if [ "$#" -lt 1 ]; then
|
||||||
printf "usage: %s %s\n" "$(basename "$0")" "-c [notebook/section/](name)"
|
printf "usage: %s %s\n" "$(basename "$0")" "-c [notebook/section/](name)"
|
||||||
return
|
return
|
||||||
@@ -247,7 +247,7 @@ vns_create () {
|
|||||||
|
|
||||||
# Create empty note
|
# Create empty note
|
||||||
mkdir -p "$(dirname "$VNS_STORE/$1.gpg")"
|
mkdir -p "$(dirname "$VNS_STORE/$1.gpg")"
|
||||||
vns_header "$(basename "$1")" | gpg --batch "$(vns_gpgid)" --encrypt -o "$VNS_STORE/$1.gpg" 2>/dev/null
|
vns_header "$(basename "$1")" | gpg --batch "${create_gpgid[@]}" --encrypt -o "$VNS_STORE/$1.gpg" 2>/dev/null
|
||||||
|
|
||||||
# Edit the note
|
# Edit the note
|
||||||
vim "$VNS_STORE/$1.gpg"
|
vim "$VNS_STORE/$1.gpg"
|
||||||
|
|||||||
Reference in New Issue
Block a user