Bash completion for tsuru command

59 views
Skip to first unread message

Gustavo Henrique

unread,
Sep 11, 2013, 10:26:00 AM9/11/13
to tsuru...@googlegroups.com
Put in $HOME/.bash_profile:

_command() {
local current=${COMP_WORDS[COMP_CWORD]}
local tasks=`tsuru | egrep "^[ ]" | awk -F ' ' '{print $1}'`
COMPREPLY=( $(compgen -W "$tasks" $current) )
}
complete -F _command tsuru

Gustavo Henrique

unread,
Sep 11, 2013, 12:11:25 PM9/11/13
to Francisco Souza, tsuru...@googlegroups.com
Pull request sent.

Abraços,

Gustavo Henrique


On Wed, Sep 11, 2013 at 11:57 AM, Francisco Souza <f...@souza.cc> wrote:
Gustavo,
We have a shameless bash-completion script [1]. Would you mind
contributing yours to us? :)

Please feel free to send a pull request.

[1] https://github.com/globocom/tsuru/tree/master/misc/bash-completion.d

Regards,
Francisco
>
> --
> You received this message because you are subscribed to the Google Groups
> "tsuru" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tsuru-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
~f

Reply all
Reply to author
Forward
0 new messages