Folders are now sorted alphabetically in the entry list

This commit is contained in:
2022-03-02 04:20:30 -05:00
parent 8cac27c6f6
commit daba737ca6
+1 -1
View File
@@ -32,7 +32,7 @@ def entry_list_gen(): # generates and prints a list of all folders and entries
_width = (len(' '.join(_entry_list)) / (_real / get_terminal_size()[0]) - 50)
print(fill(' '.join(_entry_list), width=_width))
for _root, _directories, _files in walk(path.expanduser('~/.password-pasture')):
for _dir in _directories:
for _dir in sorted(_directories):
_inner_dir = f"{_root.replace(path.expanduser('~/.password-pasture'), '')}/{_dir}"
print(f"\n\u001b[38;5;228m{_inner_dir}/")
_entry_list, _color_alternator = [], 1