From aa39da597b2a3a079d1ca0a3bd6d2b8bfe6bb659 Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Mon, 24 Mar 2025 18:27:14 -0400 Subject: update script --- modules/tmux/session-load.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules') 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 -- cgit v1.2.3