From e3a78b077a98f036b7a5e3f4e79b92cbe6e6718b Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Fri, 17 Nov 2023 09:47:43 +0100 Subject: [PATCH] fix(tmux): Better parsing for project opener --- .bin/tmux-projectinator | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bin/tmux-projectinator b/.bin/tmux-projectinator index 1c838df..247ed6b 100755 --- a/.bin/tmux-projectinator +++ b/.bin/tmux-projectinator @@ -56,7 +56,9 @@ PROJECT_LIST=$(find ~/* -name .git -type d -prune 2>/dev/null) SELECTED=$(echo $PROJECT_LIST | sed 's/\/.git/\n/g' | sed "s/$(echo $HOME | sed 's/\//\\\//g')//" | cut -d'/' -f2- | fzf) -PROJECT_PATH=$(echo $PROJECT_LIST | sed 's/\/.git/\n/g' | grep $SELECTED) +debug "Selected $SELECTED" + +PROJECT_PATH=$(echo $PROJECT_LIST | sed 's/\/.git/\n/g' | grep "${SELECTED}$") PROJECT_ROOT=$(echo $SELECTED | cut -d '/' -f1) PROJECT_NAME=$(echo $SELECTED | rev | cut -d '/' -f1 | rev)