diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2013-05-16 21:15:35 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-05-16 21:15:35 +0200 |
commit | 787f5f43cb6e8fb1a012115f979049375f6910b1 (patch) | |
tree | bb76a899efd5993bc38cde02fce5d3129e11d608 /contrib | |
parent | 9a09a2f1a5cd428abc84f615196f518cac3cdc9f (diff) | |
download | tools-787f5f43cb6e8fb1a012115f979049375f6910b1.tar.gz tools-787f5f43cb6e8fb1a012115f979049375f6910b1.tar.bz2 tools-787f5f43cb6e8fb1a012115f979049375f6910b1.zip |
bin/hostinfo: add --keys to get valid keys for a host
The bash completion uses now a dynamic list of valid keys for
a host and therefor calls the hostinfo tool itself.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/bash-completion | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/bash-completion b/contrib/bash-completion index d5a4a1f..31bc6f8 100644 --- a/contrib/bash-completion +++ b/contrib/bash-completion @@ -12,9 +12,9 @@ _hostinfo() { if [[ -z "$arg" ]]; then _completion="$_hostinfo_hosts" else - _completion="hostname os arch addresses ports vserver vserver-host" + _completion="$(hostinfo --keys $arg 2>/dev/null)" fi - COMPREPLY=( $( compgen -W "-o --oneline -f --file $_completion" -- $cur ) ) + COMPREPLY=( $( compgen -W "-o --oneline -f --file -k --keys $_completion" -- $cur ) ) } complete -F _hostinfo hostinfo |