Skip to content

Commit

Permalink
Fix --python flag and remove extra space in cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobartt committed Mar 11, 2025
1 parent cc56a1e commit 6480da3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/give-me-tmux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ while [[ "$#" -gt 0 ]]; do
fi
;;
--python)
IS_PYTHON_PROJECT=false
IS_PYTHON_PROJECT=true
;;
*)
echo "Unknown parameter passed: $1"
Expand All @@ -47,15 +47,15 @@ fi
# Function to activate the Python environment if it's a Python project
activate_env() {
if [ "$IS_PYTHON_PROJECT" = true ]; then
echo "&& source .venv/bin/activate.fish"
echo "&& source .venv/bin/activate.fish "
fi
}

# Start a new tmux session
tmux new-session -d -s "$SESSION_NAME" -n "${SESSION_NAME}-nvim"

# Set up the first window (nvim)
tmux send-keys -t "$SESSION_NAME:${SESSION_NAME}-nvim" "cd $DIRECTORY $(activate_env) && nvim" C-m
tmux send-keys -t "$SESSION_NAME:${SESSION_NAME}-nvim" "cd $DIRECTORY $(activate_env)&& nvim" C-m

# Set up the second window (shell)
tmux new-window -a -t "$SESSION_NAME" -n "${SESSION_NAME}-shell"
Expand Down

0 comments on commit 6480da3

Please sign in to comment.