Fix show entry with empty option
This commit is contained in:
parent
eedb4cb0f2
commit
53f54fee5d
|
@ -1117,6 +1117,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1145,6 +1150,7 @@ function search_entries_vault() {
|
|||
echo "# Entry logins/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_logins}
|
||||
|
@ -1172,6 +1178,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1200,6 +1211,7 @@ function search_entries_vault() {
|
|||
echo "# Entry logins/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_logins}
|
||||
|
@ -1233,6 +1245,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1256,6 +1273,7 @@ function search_entries_vault() {
|
|||
echo "# Entry logins/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_logins}
|
||||
|
@ -1285,6 +1303,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_logins} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} logins)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1308,6 +1331,7 @@ function search_entries_vault() {
|
|||
echo "# Entry logins/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_logins}
|
||||
|
@ -1341,6 +1365,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_bcard} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} bcard)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1364,6 +1393,7 @@ function search_entries_vault() {
|
|||
echo "# Entry bcard/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_bcard}
|
||||
|
@ -1391,6 +1421,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_bcard} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} bcard)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1414,6 +1449,7 @@ function search_entries_vault() {
|
|||
echo "# Entry bcard/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_bcard}
|
||||
|
@ -1446,6 +1482,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_notes} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} notes)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1461,6 +1502,7 @@ function search_entries_vault() {
|
|||
echo "# Entry notes/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_notes}
|
||||
|
@ -1488,6 +1530,11 @@ function search_entries_vault() {
|
|||
search_show_entry=""
|
||||
while [ "${search_show_entry}" != "b" ] ; do
|
||||
echo -n "# Type number entry to show content (1-XXX or b): " ; read search_show_entry
|
||||
if [ -z "${search_show_entry}" ] ; then
|
||||
echo ""
|
||||
echo "# Invalid entry. Type number entry or 'b' option."
|
||||
echo ""
|
||||
else
|
||||
result=$(cat ${pwsh_vault_cache_notes} | head -${search_show_entry} 2>/dev/null | tail -1 | cut -d "," -f 1 | cut -d "/" -f 2)
|
||||
corrupted_result=$(check_corrupted_entry_vault ${result} notes)
|
||||
if [ ${corrupted_result} -eq 0 ] ; then
|
||||
|
@ -1503,6 +1550,7 @@ function search_entries_vault() {
|
|||
echo "# Entry notes/${result} CORRUPTED"
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
rm -rf ${pwsh_vault_cache_notes}
|
||||
|
|
Loading…
Reference in New Issue
Block a user