aurora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Farner <wfar...@apache.org>
Subject Re: Adding shorthands, defaults, and initialization files to the aurora client
Date Tue, 20 May 2014 00:21:55 GMT
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 <me@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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message