dev: automated commit - 2025-11-10 10:53:27
This commit is contained in:
parent
5a71b7bdab
commit
f8cb6877ed
3 changed files with 12 additions and 2 deletions
|
|
@ -152,11 +152,12 @@ update_mru "$SELECTED_DISPLAY_CLEAN"
|
|||
|
||||
PROJECT_NAME=$(get_project_name "$SELECTED")
|
||||
SESSION_NAME="dev-${PROJECT_NAME}"
|
||||
CLASS_NAME="com.mzunino.dev.${PROJECT_NAME}"
|
||||
|
||||
launch-or-focus ghostty \
|
||||
--working-directory="$SELECTED" \
|
||||
--title="$PROJECT_NAME" \
|
||||
--class="$PROJECT_NAME" \
|
||||
--class="$CLASS_NAME" \
|
||||
-e bash -c "if tmux has-session -t '$SESSION_NAME' 2>/dev/null; then \
|
||||
tmux attach -t '$SESSION_NAME'; \
|
||||
else \
|
||||
|
|
|
|||
|
|
@ -16,11 +16,16 @@ ARGS=("$@")
|
|||
APP_NAME=$(basename "$COMMAND")
|
||||
|
||||
# Extract --class and --title values from args if present
|
||||
# Handle both --class VALUE and --class=VALUE formats
|
||||
CLASS_NAME=""
|
||||
TITLE_NAME=""
|
||||
for i in "${!ARGS[@]}"; do
|
||||
if [ "${ARGS[$i]}" = "--class" ] && [ $((i+1)) -lt ${#ARGS[@]} ]; then
|
||||
if [[ "${ARGS[$i]}" =~ ^--class=(.+)$ ]]; then
|
||||
CLASS_NAME="${BASH_REMATCH[1]}"
|
||||
elif [ "${ARGS[$i]}" = "--class" ] && [ $((i+1)) -lt ${#ARGS[@]} ]; then
|
||||
CLASS_NAME="${ARGS[$((i+1))]}"
|
||||
elif [[ "${ARGS[$i]}" =~ ^--title=(.+)$ ]]; then
|
||||
TITLE_NAME="${BASH_REMATCH[1]}"
|
||||
elif [ "${ARGS[$i]}" = "--title" ] && [ $((i+1)) -lt ${#ARGS[@]} ]; then
|
||||
TITLE_NAME="${ARGS[$((i+1))]}"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue