diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-03-24 18:27:14 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-03-24 18:27:14 -0400 |
| commit | aa39da597b2a3a079d1ca0a3bd6d2b8bfe6bb659 (patch) | |
| tree | ba46be53c338b6b85291b185d80a61eed2afa0cf | |
| parent | 41b2d2f32f7da48b0113ca65cbda4380c5c4590e (diff) | |
| download | home-aa39da597b2a3a079d1ca0a3bd6d2b8bfe6bb659.tar.gz | |
update script
| -rw-r--r-- | modules/tmux/session-load.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/tmux/session-load.sh b/modules/tmux/session-load.sh index 509dabe..623ff57 100644 --- a/modules/tmux/session-load.sh +++ b/modules/tmux/session-load.sh @@ -3,7 +3,8 @@ # usage: to create a project/session, create a symlink in .projects to the working directory # the name of the symlink is the name of the project -# if there is no path specific, prompt via fzf +# if there is no path specified, prompt via fzf +# if [[ $# -eq 1 ]]; then input=$1 else @@ -17,6 +18,11 @@ fi project_name=$input project_path=$(readlink "$HOME/.projects/$project_name") +if [[ -d $project_path ]] + echo "Error: directory '$project_path' does not exist." >&2 + exit 1 +fi + if [[ -z $(pgrep tmux) ]]; then tmux start-sever # blocking fi |