diff --git a/README.md b/README.md index 8a20ff9..2266bfa 100644 --- a/README.md +++ b/README.md @@ -85,10 +85,10 @@ set -g @sessionx-prefix off # e.g. set -g @sessionx-x-path '~/dotfiles' set -g @sessionx-x-path '' -# A comma delimited absolute-paths list of custom paths -# always visible in results and ready to create a session from. +# A comma delimited list of custom paths to always be visible in results +# and ready to create a session from. Supports glob expansions. # Tip: if you're using zoxide mode, there's a good chance this is redundant -set -g @sessionx-custom-paths '/Users/me/projects,/Users/me/second-brain' +set -g @sessionx-custom-paths "$HOME/projects,$HOME/nested-projects/*/modules/*" # A boolean flag, if set to true, will also display subdirectories # under the aforementioned custom paths, e.g. /Users/me/projects/tmux-sessionx diff --git a/scripts/sessionx.sh b/scripts/sessionx.sh index 2a5cc9d..6592899 100755 --- a/scripts/sessionx.sh +++ b/scripts/sessionx.sh @@ -52,7 +52,7 @@ additional_input() { if [[ "$custom_path_subdirectories" == "true" ]]; then paths=$(find ${clean_paths//,/ } -mindepth 1 -maxdepth 1 -type d) else - paths=${clean_paths//,/ } + paths=$(find ${clean_paths//,/ } -mindepth 0 -maxdepth 0 -type d) fi add_path() { local path=$1