From daba737ca6dc73497d617d9934dcc17ab6744768 Mon Sep 17 00:00:00 2001 From: Cuan Date: Wed, 2 Mar 2022 04:20:30 -0500 Subject: [PATCH] Folders are now sorted alphabetically in the entry list --- bin/sshyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sshyp b/bin/sshyp index 5edf98e..f0f906c 100755 --- a/bin/sshyp +++ b/bin/sshyp @@ -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