Compared to for example the /give command, the /gamerule command has too strict suggestion matching logic. In particular, the /give command first splits up the suggestions by _, and then matches each part individually. If any of the parts match, the entire string will be suggested. The /gamerule command does not split up the suggestions, which means the entire string must match. This is inconsistent, but more importantly this makes it significantly harder to find game rules when compared to items.
Consider a concrete example:
Type
/gamerule time.Observe that the game rule
advance_timeIS NOT suggested.Type
/give @s apple.Observe that
golden_appleIS suggested.
Another example is that you cannot find max_entity_cramming when typing cramming.
Both should use the same, lenient matching strategy. Currently the /gamerule command uses a worse suggestion strategy, which hurts accessibility.
I can confirm this in the game’s code as well. Items use net.minecraft.commands.SharedSuggestionProvider, while game rules rely on Brigadier’s limited suggestion logic (com.mojang.brigadier.tree.LiteralCommandNode#listSuggestions).
Can confirm. Fixing MC-309236 may fix this.
Also adding attribute <target> <attribute> modifier add <id> <value> to the report since that was the only other instance of not considering parts after an underscore that I was able to findactually I will create a new report for this since they could likely be fixed separately. (Edit: made MC-312339.)