cmd_continue: message argument truncated to only last word #225

Closed
opened 2026-04-07 15:52:51 +02:00 by shoko · 0 comments
Owner

Problem

When calling cmd_continue issue_ref message, the message gets truncated to only the last word because of incorrect for loop syntax.

Root Cause

In kugetsu-session.sh line 431:

for arg in $args; do

The unquoted $args undergoes word splitting, so create a PR for https://... becomes separate words and only the last word ends up in message.

Example

Input: cmd_continue git.fbrns.co/shoko/kugetsu#166 "create a PR for https://git.fbrns.co/shoko/kugetsu/issues/166"

Expected message: create a PR for https://git.fbrns.co/shoko/kugetsu/issues/166
Actual message: https://git.fbrns.co/shoko/kugetsu/issues/166

Fix

Change for arg in $args to for arg in "${args[@]}":

for arg in "${args[@]}"; do
    ...
done
## Problem When calling `cmd_continue issue_ref message`, the message gets truncated to only the last word because of incorrect `for` loop syntax. ## Root Cause In `kugetsu-session.sh` line 431: ```bash for arg in $args; do ``` The unquoted `$args` undergoes word splitting, so `create a PR for https://...` becomes separate words and only the last word ends up in `message`. ## Example Input: `cmd_continue git.fbrns.co/shoko/kugetsu#166 "create a PR for https://git.fbrns.co/shoko/kugetsu/issues/166"` Expected message: `create a PR for https://git.fbrns.co/shoko/kugetsu/issues/166` Actual message: `https://git.fbrns.co/shoko/kugetsu/issues/166` ## Fix Change `for arg in $args` to `for arg in "${args[@]}"`: ```bash for arg in "${args[@]}"; do ... done ```
shoko closed this issue 2026-04-07 15:57:40 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#225