So I was looking at why I can't make a script called "pvpmirror"
Then I realized it's due to some weird command registration behavior.
So now I'm wondering why it's even a thing. Only 4 usages, and only one of them look valid.
Github
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L670
https://github.com/kolmafia/kolmafi...e/kolmafia/textui/command/KitchenCommand.java
Kitchen registers "kitchen", which is likely a mistake? Unless it's supposed to catch a lot of kitchen commands.. "hellskitchen" "dogskitchen" "kitchen" etc.
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L683
https://github.com/kolmafia/kolmafi...kolmafia/textui/command/MirrorLogCommand.java
Mirror registers "mirror" which appears to be so it catches "mirrorstop" "mirrorend" "mirrorclose" as commands
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L727
https://github.com/kolmafia/kolmafi...olmafia/textui/command/RestaurantCommand.java
Not really sure about restaurant which adds "brewery", an alias sure. But why a substring?
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L799
https://github.com/kolmafia/kolmafi.../kolmafia/textui/command/VisitURLCommand.java
The only one that looks valid is the visiturl command. Which is ".php" and should be all good because commands shouldn't have periods in their name anyways. Although, I'd argue that it should be "visiturl page.php" instead. But it's a bit late to suggest that change, and for no real gain.
Changes
So anyways, I want to propose a change for the first three commands.
Kitchen, to register it as "kitchen" and not a substring. This is the one that's most likely to break I think. No idea what people call their kitchens in their scripts.
/hellkitchen is no longer valid, /kitchen
Mirror to be a simple "mirror", with only parameters supporting "end" "stop" "close" as expected. So "mirrorend" will no longer be assigned to any command.
/mirrorend is no longer valid, /mirror end
Restaurant to register "brewery", we could add the rest of the command aliases. But I feel like "Gnomishmicromicrobrewery" is unlikely to be used?
/gnomebrewery is no longer valid, /brewery
Final Notes
Would there be any issues with this, or something I'm missing?
Both "brewery" and "kitchen" I don't think are likely to be in use. And "mirrorend" and the like are more likely to be used in comparison; however I doubt more than a few people are using the "mirror" command. And they should be providing it as a param regardless.
Then I realized it's due to some weird command registration behavior.
So now I'm wondering why it's even a thing. Only 4 usages, and only one of them look valid.
Github
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L670
https://github.com/kolmafia/kolmafi...e/kolmafia/textui/command/KitchenCommand.java
Kitchen registers "kitchen", which is likely a mistake? Unless it's supposed to catch a lot of kitchen commands.. "hellskitchen" "dogskitchen" "kitchen" etc.
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L683
https://github.com/kolmafia/kolmafi...kolmafia/textui/command/MirrorLogCommand.java
Mirror registers "mirror" which appears to be so it catches "mirrorstop" "mirrorend" "mirrorclose" as commands
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L727
https://github.com/kolmafia/kolmafi...olmafia/textui/command/RestaurantCommand.java
Not really sure about restaurant which adds "brewery", an alias sure. But why a substring?
https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/KoLmafiaCLI.java#L799
https://github.com/kolmafia/kolmafi.../kolmafia/textui/command/VisitURLCommand.java
The only one that looks valid is the visiturl command. Which is ".php" and should be all good because commands shouldn't have periods in their name anyways. Although, I'd argue that it should be "visiturl page.php" instead. But it's a bit late to suggest that change, and for no real gain.
Changes
So anyways, I want to propose a change for the first three commands.
Kitchen, to register it as "kitchen" and not a substring. This is the one that's most likely to break I think. No idea what people call their kitchens in their scripts.
/hellkitchen is no longer valid, /kitchen
Mirror to be a simple "mirror", with only parameters supporting "end" "stop" "close" as expected. So "mirrorend" will no longer be assigned to any command.
/mirrorend is no longer valid, /mirror end
Restaurant to register "brewery", we could add the rest of the command aliases. But I feel like "Gnomishmicromicrobrewery" is unlikely to be used?
/gnomebrewery is no longer valid, /brewery
Final Notes
Would there be any issues with this, or something I'm missing?
Both "brewery" and "kitchen" I don't think are likely to be in use. And "mirrorend" and the like are more likely to be used in comparison; however I doubt more than a few people are using the "mirror" command. And they should be providing it as a param regardless.