projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3e6d4cd
)
zshrc: fix grmlcomp conditionals, fixup for 220d6ffa
author
Michael Prokop
<mika@grml.org>
Mon, 5 Sep 2022 08:03:37 +0000
(10:03 +0200)
committer
Michael Prokop
<mika@grml.org>
Mon, 5 Sep 2022 08:07:20 +0000
(10:07 +0200)
Thanks, miles170 for reporting
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
60f3711
..
b369aca
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-901,6
+901,7
@@
function grmlcomp () {
if [[ -r ~/.ssh/known_hosts ]] ; then
_ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*})
+ fi
if [[ -r /etc/hosts ]] && [[ "$NOETCHOSTS" -eq 0 ]] ; then
: ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(grep -v '^0\.0\.0\.0\|^127\.0\.0\.1\|^::1 ' /etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}