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

2015-10-27 Thread John Meinel
The one thing I don't think bash aliases give you is proper handling of nested subcommands. Can you easily do "juju st" in a bash alias? or does it have to become "juju-st" ? I think the caveats around people aliasing their way out of clumsiness in the tool is actually something to pay close

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

2015-10-27 Thread Cory Johns
You can accomplish most of this with the existing plugin system. You can't override existing commands, but you can easily create thin wrappers around them with your desired default args, and given the discussion around --no-aliases, it seems like this is actually a benefit. And plugins provide

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

2015-10-27 Thread Tim Penhey
I can't help but draw parallels to the plugin system. There was considerable resistance to adding the ideas of plugins to Juju. It was added complexity that no one needed and could be done simply using existing executable scripts, like juju-foo. Tim On 28/10/15 07:33, Cory Johns wrote: > You

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

2015-10-27 Thread Aaron Bentley
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Thank you! Aaron On 2015-10-26 09:22 PM, Tim Penhey wrote: > On 24/10/15 04:05, Aaron Bentley wrote: >> bzr has a similar feature, but the problem with such a feature is >> that it can break scripts that expect the normal behaviour. >> That's why

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

2015-10-27 Thread Nate Finch
You're not selling me on this ;) On Tue, Oct 27, 2015, 4:01 PM Tim Penhey wrote: > I can't help but draw parallels to the plugin system. > > There was considerable resistance to adding the ideas of plugins to > Juju. It was added complexity that no one needed and

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

2015-10-26 Thread Tim Penhey
On 24/10/15 04:05, Aaron Bentley wrote: > bzr has a similar feature, but the problem with such a feature is that > it can break scripts that expect the normal behaviour. That's why bzr > provides a --no-aliases option, which all scripts calling bzr should use. > > The same applies to Juju. If

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

2015-10-26 Thread Tim Penhey
On 24/10/15 00:40, Rick Harding wrote: > > > On Fri, Oct 23, 2015 at 12:12 AM Tim Penhey > wrote: > > Hi folks, > > Firstly, the ability to specify default flags for commands: > status = status --format=tabular > >

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

2015-10-26 Thread Tim Penhey
On 23/10/15 21:28, roger peppe wrote: > On 23 October 2015 at 05: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

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

2015-10-26 Thread Tim Penhey
Hi Wayne, While I can see your point of view, I do disagree. While it may be of no benefit to you, it doesn't mean that others will not find it useful. I believe it is useful to have one format to specify aliases, one that doesn't depend on the shell that you use. The overhead in complexity

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

2015-10-26 Thread Wayne Witzel
What is the advantage of this over using a standard alias in my shell profile? On Fri, Oct 23, 2015 at 11:05 AM, Aaron Bentley wrote: > bzr has a similar feature, but the problem with such a feature is that > it can break scripts that expect the normal behaviour.

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

2015-10-26 Thread Wayne Witzel
After looking at this and the code more, I find myself very against this feature. This adds code to core that is performing a tasks that most people already know is handled by their shell. Even our Windows users can install PowerShell and have aliases for commands. This adds no benefit to core, it

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

2015-10-23 Thread Aaron Bentley
bzr has a similar feature, but the problem with such a feature is that it can break scripts that expect the normal behaviour. That's why bzr provides a --no-aliases option, which all scripts calling bzr should use. The same applies to Juju. If "status" gets defaulted to "status

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

2015-10-23 Thread Dimiter Naydenov
-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 >

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

2015-10-23 Thread roger peppe
On 23 October 2015 at 05: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