mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-02 23:27:17 -04:00
Folders are now sorted alphabetically in the entry list
This commit is contained in:
@@ -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)
|
_width = (len(' '.join(_entry_list)) / (_real / get_terminal_size()[0]) - 50)
|
||||||
print(fill(' '.join(_entry_list), width=_width))
|
print(fill(' '.join(_entry_list), width=_width))
|
||||||
for _root, _directories, _files in walk(path.expanduser('~/.password-pasture')):
|
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}"
|
_inner_dir = f"{_root.replace(path.expanduser('~/.password-pasture'), '')}/{_dir}"
|
||||||
print(f"\n\u001b[38;5;228m{_inner_dir}/")
|
print(f"\n\u001b[38;5;228m{_inner_dir}/")
|
||||||
_entry_list, _color_alternator = [], 1
|
_entry_list, _color_alternator = [], 1
|
||||||
|
|||||||
Reference in New Issue
Block a user