Return to edit menu when editing entry

This commit is contained in:
q3aql 2022-06-12 11:55:15 +02:00
parent a511d1ddac
commit e92995a90a
2 changed files with 7 additions and 2 deletions

View File

@ -907,7 +907,7 @@ function edit_entry_vault() {
if [ ${count_total} -ne 0 ] ; then if [ ${count_total} -ne 0 ] ; then
echo "" echo ""
fi fi
echo -n "# Type entry to edit (Default: return): " ; read vault_edit_entry echo -n "# Type entry to edit (Default: Return): " ; read vault_edit_entry
if [ -z "${vault_edit_entry}" ] ; then if [ -z "${vault_edit_entry}" ] ; then
echo "# Canceled Edit Entry" echo "# Canceled Edit Entry"
else else
@ -1022,11 +1022,13 @@ function edit_entry_vault() {
echo "# ENTRY ${vault_edit_entry} EDITED" echo "# ENTRY ${vault_edit_entry} EDITED"
echo "" echo ""
echo -n "# Press enter key to continue " ; read enter_continue echo -n "# Press enter key to continue " ; read enter_continue
edit_entry_vault
else else
echo "" echo ""
echo "# Entry ${vault_edit_entry} does no exist" echo "# Entry ${vault_edit_entry} does no exist"
echo "" echo ""
echo -n "# Press enter key to continue " ; read enter_continue echo -n "# Press enter key to continue " ; read enter_continue
edit_entry_vault
fi fi
fi fi
} }

View File

@ -5,7 +5,7 @@
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@duck.com # # Contact: q3aql@duck.com #
# License: GPL v2.0 # # License: GPL v2.0 #
# Last-Change: 11-06-20222 # # Last-Change: 12-06-20222 #
# ######################################################### # #########################################################
VERSION="0.1" VERSION="0.1"
@ -1163,8 +1163,10 @@ function edit_entry_vault() {
fi fi
fi fi
echo > /dev/null | pwsh-vaultm -p " ENTRY EDITED: ${vault_edit_entry} $(generate_spaces 60)" echo > /dev/null | pwsh-vaultm -p " ENTRY EDITED: ${vault_edit_entry} $(generate_spaces 60)"
edit_entry_vault
else else
echo "# Entry ${vault_edit_entry} does no exist" echo "# Entry ${vault_edit_entry} does no exist"
edit_entry_vault
fi fi
fi fi
} }
@ -1277,6 +1279,7 @@ function search_result_show_note() {
if [ ${corrupted_result} -eq 0 ] ; then if [ ${corrupted_result} -eq 0 ] ; then
note_decrypt=$(cat notes/${result}/note | tail -1 | cut -d ";" -f 2) note_decrypt=$(cat notes/${result}/note | tail -1 | cut -d ";" -f 2)
note_decrypt=$(vault_key_decrypt "${note_decrypt}") note_decrypt=$(vault_key_decrypt "${note_decrypt}")
note_decrypt=$(restoreSpaces "${note_decrypt}")
echo >> ${pwsh_vault_clipboard_copy} echo >> ${pwsh_vault_clipboard_copy}
echo "* Name Entry: notes/${result}" >> ${pwsh_vault_clipboard_copy} echo "* Name Entry: notes/${result}" >> ${pwsh_vault_clipboard_copy}
echo "* Note: ${note_decrypt}" >> ${pwsh_vault_clipboard_copy} echo "* Note: ${note_decrypt}" >> ${pwsh_vault_clipboard_copy}