Closed doublestrafe closed 2 years ago
whoops, my bad. will address this tomorrow if i'm able.
after a cursory look at some other scripts to see what the best practices might be, a majority seem to ignore -h / -help arguments. drain-aquifer
runs destructively without complaint while fillneeds
errors with a stack trace, for example. neither display help. i'll continue working on autonick, but it might be worth going through the list of scripts more thoroughly and documenting which ones need the same treatment.
Agreed. Here's an example of a script that handles various forms of the "help" parameter and might be a good example to follow: https://github.com/DFHack/scripts/blob/master/prioritize.lua#L534
It handles "-h", "--help", and "help". It might work for "-help" too since that's the same as "-h -e -l -p" and "-h" is the first param that is processed.
autonick immediately runs and changes nicknames of all un-nicked dwarves when run with any arguments. This behavior is inconsistent with all other dfhack scripts and utilities, which generally accept "help" or "-help" to give detail about what the command does and how to use it. This leads to new users finding themselves with all their dwarves renamed, with no confirmation, and no way to change them back automatically.
Suggested remediations: