add -maxdepth to find in the ts() function

This commit is contained in:
Sheldon Lee 2024-12-20 09:48:51 +08:00
parent 88b3a0f03d
commit 0cde7b2f25

View File

@ -32,7 +32,7 @@ cfg()
# session there with the name of the directory. # session there with the name of the directory.
ts() ts()
{ {
dir=$(find -L $HOME/Documents -type d 2> /dev/null | fzf) dir=$(find --maxdepth 2 -L $HOME/Documents -type d 2> /dev/null | fzf)
[ -z "$dir" ] && return [ -z "$dir" ] && return
tmux new -s $(basename "$dir") -c "$dir" tmux new -s $(basename "$dir") -c "$dir"
} }