diff options
Diffstat (limited to 'contrib/bash-completion')
-rw-r--r-- | contrib/bash-completion | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/bash-completion b/contrib/bash-completion index 1adad22..0994d39 100644 --- a/contrib/bash-completion +++ b/contrib/bash-completion @@ -1,7 +1,5 @@ # hostinfo completion -_hostinfo_hosts="$(for file in /usr/local/share/hostinfo/* ; do basename $file | sed 's/.spline.inf.fu-berlin.de//' ; done)" - _get_first_hostinfo_arg() { local i @@ -30,6 +28,7 @@ _get_hostinfo_path() done } + _hostinfo() { local cur prev @@ -43,7 +42,7 @@ _hostinfo() { _get_first_hostinfo_arg _get_hostinfo_path if [[ -z "$arg" ]]; then - _completion="$_hostinfo_hosts" + _completion="$(hostinfo $path --hosts --short 2>/dev/null)" else _completion="$(hostinfo $path --keys $arg 2>/dev/null)" fi |