paradoxuum / centurion

A flexible and extensible command framework for roblox-ts
https://centurion.paradoxum.dev/
MIT License
26 stars 5 forks source link

Fix suggestions when numArgs is set to rest #45

Closed paradoxuum closed 2 weeks ago

paradoxuum commented 2 weeks ago

The initial use case for this was to fix suggestions for string arguments with numArgs set to rest. For example, if you had a command to spawn a vehicle, it would treat each part of the argument (separated by a space) as its own argument, which can cause issues when you want the suggestions to carry over from the previous part (e.g. if the vehicle has a space in its name).

This kind of goes against what I had in mind when implementing numArgs though, and it also deviates from how other command frameworks treat this kind of thing. Going back to the vehicle example, it probably makes more sense for the argument to be a string without the numArgs option. At that point the user can just quote the string if the vehicle has a space in its name, e.g. vehicle spawn "Car Name"