hoop33 / wry

App.net command-line client for Mac OS X
http://grailbox.com/wry
MIT License
43 stars 6 forks source link

commands should use subject-verb format #42

Open jeremy-w opened 11 years ago

jeremy-w commented 11 years ago

Switch to a subject-verb command-subcommand structure like wry file upload $PATH and wry 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 becomes wry file upload during an argument preprocess step.

This would also make #36 very straightforward!

hoop33 commented 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?

jeremy-w commented 11 years ago

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.