fix(tmux): Better parsing for project opener

This commit is contained in:
Tanguy Herbron 2023-11-17 09:47:43 +01:00
parent 754d7c20d1
commit e3a78b077a

View File

@ -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) 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_ROOT=$(echo $SELECTED | cut -d '/' -f1)
PROJECT_NAME=$(echo $SELECTED | rev | cut -d '/' -f1 | rev) PROJECT_NAME=$(echo $SELECTED | rev | cut -d '/' -f1 | rev)