+1 to completion
On Mon, May 19, 2014 at 5:21 PM, Bill Farner <wfar...@apache.org> wrote: > Personally, i'm a much bigger fan of bash completion than shorthand. > Completion brings along none of the risk AFAICT, but has the added benefit > of improving the story for discovering subcommands. > > -=Bill > > > On Mon, May 19, 2014 at 4:51 PM, Jay Buffington <m...@jaybuff.com> wrote: > > > > > > > > > > > ## Standard Shortcuts > > > > > > > > To save typing, we'll add _automatic_ shorthand generation to > > > > the command-line framework. For nouns and verbs, any unambiguous > > > > prefix of the appropriate word will be automatically expanded to > > > > the full word. > > > > > > > > * `aurora j c` will be expanded to `aurora job create`. > > > > * `aurora con l` will be expanded to `aurora config list`. > > > > > > > > > > I'm a strong -1 against this. I don't think it saves much for the user > > and > > > I'd also be concerned how it plays with both the command plugin system > > and > > > our own ability to add commands in the future which could change how > > > prefixes are resolved. > > > > > > You can use bash completion for this (btw, zsh can parse bash > completion). > > > > Implement an "aurora bash-completion" command which splits out the bash > > completion configuration. Then users (if they'd like) can put something > > like > > this in their ~/.bash_profile: > > > > complete -F `aurora bash-completion` aurora > > > > Then the user can type "aurora con<tab>" and con will get expand to > config. > > > > > > > > > > ### Config Files > > > > > > > > The aurora client will look for a configuration file in the following > > > > locations, in order: > > > > > > > > 1. A file named "AuroraInit" in the current directory. > > > > 2. A file named "AuroraInit" in the sequence of parent directories > > of > > > > the > > > > current directory up to the nearest repository root. > > > > 3. A file named ".aurora" in the user's home directory. > > > > > > > I'd like to set this via a command line arg (e.g. --config), and perhaps > > even > > an environment variable (e.g. AURORA_CLIENT_CONFIG) > > > > Jay > > >