mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Updated read_shortcut() to use argument_list[] notation
Former-commit-id: 01a62c169c089618c8015f94f9d63ddbfb295d37 [formerly c0f3296a75]
Former-commit-id: 4bf2ff467f12d9f1e7c5f7fd0187d441718808a7
This commit is contained in:
+3
-3
@@ -364,11 +364,11 @@ def no_arg(): # displays a list of entries and gives an option to select one fo
|
||||
|
||||
|
||||
def read_shortcut(): # shortcut to quickly read an entry
|
||||
if not Path(f"{directory}{argument.replace('/', '', 1)}.gpg").exists():
|
||||
print(f"\n\u001b[38;5;9merror: entry ({argument.replace('/', '', 1)}) does not exist\u001b[0m\n")
|
||||
if not Path(f"{directory}{argument_list[0].replace('/', '', 1)}.gpg").exists():
|
||||
print(f"\n\u001b[38;5;9merror: entry ({argument_list[0].replace('/', '', 1)}) does not exist\u001b[0m\n")
|
||||
s_exit(1)
|
||||
_shm_folder, _shm_entry = shm_gen()
|
||||
decrypt(directory + argument.replace('/', '', 1), _shm_folder, _shm_entry, gpg)
|
||||
decrypt(directory + argument_list[0].replace('/', '', 1), _shm_folder, _shm_entry, gpg)
|
||||
entry_reader(f"{tmp_dir}{_shm_folder}/{_shm_entry}")
|
||||
rmtree(f"{tmp_dir}{_shm_folder}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user