dev: automated commit - 2025-11-10 10:53:27

This commit is contained in:
Mariano Z. 2025-11-10 10:53:27 -03:00
parent 5a71b7bdab
commit f8cb6877ed
3 changed files with 12 additions and 2 deletions

View file

@ -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