No longer display empty directory notification on the root

Former-commit-id: 86b964901547d3daf607583da762b1e10426cc3a
Former-commit-id: da5e860b1e237b82e0a9525ff451f17825c6ac88
This commit is contained in:
2023-03-01 19:30:15 -05:00
parent 7d26170d7f
commit 99cf9b7413
+3 -3
View File
@@ -19,8 +19,6 @@ def entry_list_gen(_directory=expanduser('~/.local/share/sshyp/')): # generates
_entry_list, _color_alternator = [], 1
if _ran:
print(f"\u001b[38;5;15;48;5;238m{_root.replace(expanduser('~/.local/share/sshyp'), '', 1)}/\u001b[0m")
else:
_ran = True
for filename in sorted(_files):
if _color_alternator > 0:
_entry_list.append(filename[:-4])
@@ -34,8 +32,10 @@ def entry_list_gen(_directory=expanduser('~/.local/share/sshyp/')): # generates
_width = (len(' '.join(_entry_list)) / (_real / get_terminal_size()[0]) - 25)
if len(_entry_list) > 0:
print(fill(' '.join(_entry_list), width=_width) + '\n')
else:
elif _ran:
print('\u001b[38;5;9m-empty directory-\u001b[0m\n')
else:
_ran = True
def entry_reader(_decrypted_entry): # displays the contents of an entry in a readable format