Aravinda
2016-Apr-18 06:59 UTC
[Gluster-users] Proposal for third party sub commands for Gluster CLI
Hi, As many of you aware, git supports external subcommand support which enables users to extend the functionality around git. Create a shell script "git-hello" as below and place it anywhere in system(should be available in $PATH) #!/bin/bash echo "Hello World" Make this script executable, (chmod +x /usr/local/bin/git-hello) This can be executed as `git-hello` or `git hello` (Other example is git-review tool, can be executed as git-review or git review) Similarly we can have sub command support for Gluster CLI. If any script/binary available in PATH env with the name gluster-<CMD> can be executed as `gluster <CMD>` Let me know what you guys think about this feature. I am also planning to add this feature to glustertool(https://github.com/gluster/glustertool) -- regards Aravinda
Nandaja Varma
2016-Apr-18 07:06 UTC
[Gluster-users] [Gluster-devel] Proposal for third party sub commands for Gluster CLI
Hey Aravinda, I think this would be a really useful feature. This would make CLI more flexible and easy for the feature developers to integrate their feature to glustertool. +1. Looking forward to seeing this feature in action. Cheers, N. ----- Original Message ----- From: "Aravinda" <avishwan at redhat.com> To: "Gluster Devel" <gluster-devel at gluster.org>, "gluster-users" <gluster-users at gluster.org> Sent: Monday, April 18, 2016 12:29:44 PM Subject: [Gluster-devel] Proposal for third party sub commands for Gluster CLI Hi, As many of you aware, git supports external subcommand support which enables users to extend the functionality around git. Create a shell script "git-hello" as below and place it anywhere in system(should be available in $PATH) #!/bin/bash echo "Hello World" Make this script executable, (chmod +x /usr/local/bin/git-hello) This can be executed as `git-hello` or `git hello` (Other example is git-review tool, can be executed as git-review or git review) Similarly we can have sub command support for Gluster CLI. If any script/binary available in PATH env with the name gluster-<CMD> can be executed as `gluster <CMD>` Let me know what you guys think about this feature. I am also planning to add this feature to glustertool(https://github.com/gluster/glustertool) -- regards Aravinda _______________________________________________ Gluster-devel mailing list Gluster-devel at gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel
Vijay Bellur
2016-Apr-18 13:14 UTC
[Gluster-users] Proposal for third party sub commands for Gluster CLI
On 04/18/2016 02:59 AM, Aravinda wrote:> Hi, > > As many of you aware, git supports external subcommand support which > enables users to extend the functionality around git. > > Create a shell script "git-hello" as below and place it anywhere in > system(should be available in $PATH) > > #!/bin/bash > echo "Hello World" > > Make this script executable, (chmod +x /usr/local/bin/git-hello) > > This can be executed as `git-hello` or `git hello` (Other example is > git-review tool, can be executed as git-review or git review) > > Similarly we can have sub command support for Gluster CLI. If any > script/binary available in PATH env with the name gluster-<CMD> can be > executed as `gluster <CMD>` > > Let me know what you guys think about this feature. I am also planning > to add this feature to > glustertool(https://github.com/gluster/glustertool) >+1 to this idea. I think projects built around gluster can certainly benefit from such a feature. -Vijay