Open jeremy-w opened 11 years ago
I've thought about this one and am not sold. It would help on namespacing the verbs, but I'm not sure how big an issue that is. This approach would require more typing, so the upside would need to be clear. What are your thoughts on what problems this would solve?
More typing can be solved in a heavy-handed way via command aliases. It's a shell program, so alias wp='wry post new'
is available to the user at all times and works without requiring any in-app code.
The app can avoid the need for anyone to do that by using the minimal-unique-string approach to matching commands as demonstrated in LLDB and GDB, which allows you to abbreviate "frame variables" to "fr var" and "breakpoint list" to "br l".
If the plan is to have shell functions to provide command completion anyway, it's easy to seed default aliases, and typing length is shortened greatly by use of the <TAB> key.
Switch to a subject-verb command-subcommand structure like
wry file upload $PATH
andwry user follow $USER
. This format is mostly orthogonal to the existing system, so the current commands would become aliases for the full version, e.g.wry upload
becomeswry file upload
during an argument preprocess step.This would also make #36 very straightforward!