New feature for 1.26 (master), $(JUJU_HOME)/aliases

Dimiter Naydenov dimiter.naydenov at canonical.com
Fri Oct 23 07:48:19 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Awesome!! \o/

As a big fan of aliases (bash, git, etc.) I'd start using this right
away with juju now! :)

Thanks Tim!

Dimiter

On 23.10.2015 07:12, Tim Penhey wrote:
> Hi folks,
> 
> I scratched a personal itch yesterday and added the ability for
> users to specify their own aliases for juju commands.
> 
> There are two primary use cases that I was trying to address.
> 
> Firstly, the ability to specify default flags for commands: status
> = status --format=tabular
> 
> I could never remember the right environment variable to set to
> get tabular by default.
> 
> The second was to allow quicker iteration around playing with new
> CLI structure.  As most people are aware, the 2.0 CLI is going to
> be somewhat different to the current one, and I thought it would be
> good to provide a way in which we could "test drive" the new CLI
> with the existing codebase without having to actually code
> anything.
> 
> The aliases files lives in JUJU_HOME, and is a simple text file.
> Each non blank line that doesn't start with a '#' is considered to
> be an alias. The format is expected to be:
> 
> <command> = <command> [<args>...]
> 
> So we can do things like:
> 
> # stat is like two whole letters shorter... stat = status
> --format=tabular
> 
> # list tests list-environments = system environments list-users =
> user list
> 
> and so on.
> 
> Tim
> 


- -- 
Dimiter Naydenov <dimiter.naydenov at canonical.com>
Juju Core Sapphire team <http://juju.ubuntu.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJWKeZDAAoJENzxV2TbLzHwOuMH/Rt5OqT29cGheVBNGraC0guR
qYSyS8nqsSKb7gizmu9HrbJeQjpQfv+Dskc97yOXlxsQbhfBrFGHkkHl15jsKHBh
XCx531/olNhs8Y9uqfI31SjMqRW4U0wylF4sVfMOpIsrTlJcuU7EQ8meYj0ObR7T
RWv9Rg6pg6b6fQ5tylVV+8LjE6YyRUr+V+8rQp/PLwVrACJQqVyi+tL5UQKd53vj
pgCqEbRJ/wN8fcQP7Pf6jh+FC84xecwmAd9Zc/toHXHh0ZYSKl022h0pPff/1XoB
JQqGyH4SS7XAR3T6jiy6ub7wYCe0LgkPtl13nbcrWR1YYZK1pJxtH+kdkwfYaXk=
=UrrP
-----END PGP SIGNATURE-----



More information about the Juju-dev mailing list