Fix the same issue for the nth time

This commit is contained in:
2025-10-10 10:42:18 +02:00
parent addca486ba
commit c528330e0e

View File

@@ -71,7 +71,7 @@ fi
# Use command line arguments if provided, otherwise use config
if [ $# -gt 0 ]; then
COMMANDS=("$*")
COMMANDS=("$@")
echo "Using command line arguments: $*"
else
if [ ${#COMMANDS[@]} -eq 0 ]; then
@@ -81,11 +81,6 @@ else
echo "Using config commands: ${COMMANDS[*]}"
fi
# Use session name from config, or first word of first command if not set
if [ -z "$SESSION" ]; then
SESSION=$(echo "${COMMANDS[0]}" | awk '{print $1}')
fi
# Create session if missing
if ! tmux has-session -t $SESSION 2>/dev/null; then
echo "Creating tmux session: $SESSION"