dotfiles

custom dotfiles
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 061da1b239ccd1546b41a379b0371320c292583a
parent 5566c17d95e54c604c47594a694756213972d1c3
Author: pyratebeard <root@pyratebeard.net>
Date:   Wed, 30 Mar 2022 22:54:28 +0100

auto completion for ssux

Diffstat:
Azsh/.zsh/completion/_ssux | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/zsh/.zsh/completion/_ssux b/zsh/.zsh/completion/_ssux @@ -0,0 +1,18 @@ +#compdef ssux + +_ssux() { + local -a hosts + IFS=$'\n' hosts=($(\ + awk '/^Host [A-Za-z]+/ {print $2}' \ + $HOME/.ssh/config \ + $HOME/.ssh/hosts.conf \ + $HOME/.ssh/local.conf \ + $HOME/.ssh/lxc.conf)) + local -a known + known=($(awk '/^[A-Za-z]+/ {print $1}' $HOME/.ssh/known_hosts | awk -F, '{print $1}' | sort | uniq)) + _describe -t hosts 'hosts' hosts + _describe -t known 'known' known + return 0 +} + +_ssux