From e699c03b9028e3290ddc722ff9b4a455c1dd5b2d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 17 Sep 2021 21:26:34 +0100 Subject: [PATCH] fix: sort directory list before piping to fzf --- bin/bin/tmux-sessioniser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bin/tmux-sessioniser b/bin/bin/tmux-sessioniser index 34a4f5a..a9a6df0 100755 --- a/bin/bin/tmux-sessioniser +++ b/bin/bin/tmux-sessioniser @@ -11,7 +11,7 @@ if [[ $# -eq 1 ]]; then else # Get the session name from fuzzy-finding list of directories and generating a # tmux-safe version. - selected=$(find ~/ ~/Code ~/Code/clients ~/Code/os ~/Code/Personal ~/Documents/Talks/ -mindepth 1 -maxdepth 1 -type d -not -name ".*" | fzf) + selected=$(find ~/ ~/Code ~/Code/clients ~/Code/os ~/Code/Personal ~/Documents/Talks/ -mindepth 1 -maxdepth 1 -type d -not -name ".*" | sort | fzf) fi selected_name=$(basename "$selected" | tr . -)