Mercurial > hg > thermostat-ng > agent
changeset 1725:0a442d446475
Move bash completion out of image dir
Reviewed-by: jerboaa, neugens
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-March/013451.html
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Wed, 01 Apr 2015 13:45:48 -0400 |
parents | 3825a03e819a |
children | eb6a8ed6d5f7 |
files | distribution/bash-completion/thermostat-completion distribution/pom.xml distribution/scripts/thermostat-completion |
diffstat | 3 files changed, 22 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/distribution/bash-completion/thermostat-completion Wed Apr 01 13:45:48 2015 -0400 @@ -0,0 +1,17 @@ +#/bin/bash +_thermostat() +{ + local cur prev opts base + local thermostat_install_dir + thermostat_install_dir="${thermostat.home}" + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + # Thermostat Options + opts="$(${thermostat_install_dir}/bin/thermostat help | cut -d " " -f 2 | tr '\n' ' ' | cut -d " " -f 3-)" + + COMPREPLY=($(compgen -W "${opts}" -- ${cur})) + return 0 +} +complete -F _thermostat thermostat
--- a/distribution/pom.xml Wed Apr 01 15:53:08 2015 +0200 +++ b/distribution/pom.xml Wed Apr 01 13:45:48 2015 -0400 @@ -199,6 +199,11 @@ <include>thermostat.1</include> </includes> </resource> + <resource> + <directory>bash-completion</directory> + <targetPath>bash-completion</targetPath> + <filtering>true</filtering> + </resource> </resources> </configuration> </execution>
--- a/distribution/scripts/thermostat-completion Wed Apr 01 15:53:08 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -#/bin/bash -_thermostat() -{ - local cur prev opts base - local thermostat_install_dir - thermostat_install_dir="${thermostat.home}" - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - - # Thermostat Options - opts="$(${thermostat_install_dir}/bin/thermostat help | cut -d " " -f 2 | tr '\n' ' ' | cut -d " " -f 3-)" - - COMPREPLY=($(compgen -W "${opts}" -- ${cur})) - return 0 -} -complete -F _thermostat thermostat