Fixed unterminated if
This commit is contained in:
15
vns
15
vns
@@ -165,6 +165,13 @@ vns_create () {
|
|||||||
|
|
||||||
# Create-Edit the note
|
# Create-Edit the note
|
||||||
vim "$VNS_STORE/$1.gpg"
|
vim "$VNS_STORE/$1.gpg"
|
||||||
|
|
||||||
|
# Warn the user if the note failed to encrypt
|
||||||
|
if ! grep "PGP" <<< "$(file "$VNS_STORE/$1")" > /dev/null; then
|
||||||
|
printf "$VNS_RED_COLOR!$VNS_RESET_COLOR - %s\n %s\n"\
|
||||||
|
"The created note was not encrypted."\
|
||||||
|
"Check your vim-gnupg setup."
|
||||||
|
fi
|
||||||
|
|
||||||
# Update Git
|
# Update Git
|
||||||
git add "$VNS_STORE/$1.gpg" > /dev/null
|
git add "$VNS_STORE/$1.gpg" > /dev/null
|
||||||
@@ -186,12 +193,6 @@ vns_edit () {
|
|||||||
# Edit the specified note
|
# Edit the specified note
|
||||||
vim "$VNS_STORE/$1.gpg"
|
vim "$VNS_STORE/$1.gpg"
|
||||||
|
|
||||||
# Warn the user if the note failed to encrypt
|
|
||||||
if ! grep "PGP" <<< "$(file "$VNS_STORE/$1")" > /dev/null; then
|
|
||||||
printf "$VNS_RED_COLOR!$VNS_RESET_COLOR - %s\n %s\n"\
|
|
||||||
"The created note was not encrypted."\
|
|
||||||
"Check your vim-gnupg setup."
|
|
||||||
|
|
||||||
# Update Git
|
# Update Git
|
||||||
git add "$VNS_STORE/$1.gpg" > /dev/null
|
git add "$VNS_STORE/$1.gpg" > /dev/null
|
||||||
git commit -m "Edited $1" > /dev/null
|
git commit -m "Edited $1" > /dev/null
|
||||||
@@ -217,7 +218,7 @@ vns () {
|
|||||||
if [ "$*" != "-i" ]; then
|
if [ "$*" != "-i" ]; then
|
||||||
vns_sanityCheck;
|
vns_sanityCheck;
|
||||||
# Change Directory to Store for Git passthrough
|
# Change Directory to Store for Git passthrough
|
||||||
cd $VNS_STORE || exit;
|
cd "$VNS_STORE" || exit;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user