Skip to content

Conversation

@Rienkim
Copy link
Contributor

@Rienkim Rienkim commented Oct 26, 2025

Closes #2199

@rekram1-node
Copy link
Collaborator

@Rienkim I think we are gonna do named args instead of that format, if you are up for it if you update this pr to support named args I will review and merge it

@Rienkim Rienkim force-pushed the command-argument-split branch from cf420ad to 1727741 Compare October 28, 2025 05:48
@Rienkim
Copy link
Contributor Author

Rienkim commented Oct 28, 2025

@rekram1-node
Is it okay if the named argument has the following format?
/mycommand test.ts --mode=strict --env=production

In the custom command prompt, ARGUMENTS is applied as follows:

$ARGUMENTS[0]     // test.ts
$ARGUMENTS[1]     // --mode=strict
$ARGUMENTS[2]     // --env=production
$ARGUMENTS        // "test.ts --mode=strict --env=production"
$ARGUMENTS.mode   // "strict"
$ARGUMENTS.env    // "production"

@rekram1-node
Copy link
Collaborator

@Rienkim actually I talked with the team let's just do a similar thing to what claude code does,

we can use the $1, $2 for positional args like sql, and otherwise everything is replaced into $ARGUMENTS

See their docs for inspiration: https://docs.claude.com/en/docs/claude-code/slash-commands#arguments

@Rienkim
Copy link
Contributor Author

Rienkim commented Oct 29, 2025

@rekram1-node
I agree with your suggestion. I will change code of this PR to support $1, $2 for positional args.

@rekram1-node
Copy link
Collaborator

sweet thanks!

@Rienkim Rienkim force-pushed the command-argument-split branch from 1727741 to 4aa9e91 Compare October 29, 2025 09:08
@Rienkim
Copy link
Contributor Author

Rienkim commented Oct 29, 2025

@rekram1-node
I updated code with $1, $2 for positional args.

@rekram1-node
Copy link
Collaborator

rekram1-node commented Oct 29, 2025

Nice work! Gonna make some tweaks and merge

@rekram1-node rekram1-node force-pushed the command-argument-split branch from 4aa9e91 to 6fd94a2 Compare October 29, 2025 19:50
@rekram1-node rekram1-node changed the title feat: Command argument split feat: add positional argument support to slash commands Oct 29, 2025
@rekram1-node rekram1-node merged commit a9cae7b into sst:dev Oct 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants