A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Felixoid/zsh-hoco below:

Felixoid/zsh-hoco: ZSH _hosts autocompletion extension

HOCO - zsh hosts completion

Small function to improve and extend original zsh _hosts completion function.

The original zsh hosts completion is not extendable. And when you replace it with zstyle -e ':completion:*:hosts' hosts 'reply=(...)', all original completions should be represented too.

On the other hand, _hosts caches all hosts for autocompletion only once, and then uses it. And it's not so obvious how to reset it.

The hoco.zsh solves both _hosts flaws:

The only thing you need to do is:

source hoco.zsh
some-function() {
  echo host1 host2 # it does not matter if hosts are separated by spaces
  echo host3	host4 # or by new lines (LF), or by tabs
}
HOCO_FUNCTIONS=(some-function)

ssh <tab>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4