|
@ -31,6 +31,8 @@ if test -z "$sessiondir"; then |
|
|
if ! test -z "$depth" && test "$depth" -eq 0; then |
|
|
if ! test -z "$depth" && test "$depth" -eq 0; then |
|
|
sessiondir="$(find $findargs\ |
|
|
sessiondir="$(find $findargs\ |
|
|
\! -iwholename '*.git*'\ |
|
|
\! -iwholename '*.git*'\ |
|
|
|
|
|
\! -iwholename '*.vscode*'\ |
|
|
|
|
|
\! -iwholename '*.idea*'\ |
|
|
\! -iwholename '*node_modules*'\ |
|
|
\! -iwholename '*node_modules*'\ |
|
|
\! -iwholename '*__pycache__*'\ |
|
|
\! -iwholename '*__pycache__*'\ |
|
|
\! -iwholename '*venv*'\ |
|
|
\! -iwholename '*venv*'\ |
|
@ -38,6 +40,8 @@ if test -z "$sessiondir"; then |
|
|
else |
|
|
else |
|
|
sessiondir="$(find $findargs -maxdepth ${depth:-2}\ |
|
|
sessiondir="$(find $findargs -maxdepth ${depth:-2}\ |
|
|
\! -iwholename '*.git*'\ |
|
|
\! -iwholename '*.git*'\ |
|
|
|
|
|
\! -iwholename '*.vscode*'\ |
|
|
|
|
|
\! -iwholename '*.idea*'\ |
|
|
\! -iwholename '*node_modules*'\ |
|
|
\! -iwholename '*node_modules*'\ |
|
|
\! -iwholename '*__pycache__*'\ |
|
|
\! -iwholename '*__pycache__*'\ |
|
|
\! -iwholename '*venv*'\ |
|
|
\! -iwholename '*venv*'\ |
|
@ -50,7 +54,7 @@ if test -z "$sessiondir" || ! test -d "$sessiondir"; then |
|
|
exit 0 |
|
|
exit 0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
name="$(basename "$(realpath "$sessiondir" )" | tr '.' '_')" |
|
|
|
|
|
|
|
|
name="$(realpath "$sessiondir" | tr '.' '_')" |
|
|
|
|
|
|
|
|
if test -z "$TMUX" && test -z "$(pgrep tmux)"; then |
|
|
if test -z "$TMUX" && test -z "$(pgrep tmux)"; then |
|
|
tmux new-session -c "$sessiondir" -s "$name" |
|
|
tmux new-session -c "$sessiondir" -s "$name" |
|
|