Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fun zsh trick for today



> i think, this would be a great feature of the mailinglist, if
> bart or sven or some other guru would give such nice tricks once
> a week or something.
> it makes happy user, at least it made me happy :)

I'm no Bart-guru, but here's an application of his trick that I find useful
for the new completion system:

zmodload -i zsh/mapfile
hosts=(${(@)${(@)${(M)${(f)mapfile[$HOME/.ssh/known_hosts]}:#[^0-9]*}%%\ *}%%,*})
zstyle ':completion:*:hosts' hosts $hosts



Messages sorted by: Reverse Date, Date, Thread, Author