mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-01 09:41:44 +02:00
* 40782: avoid dependency on zsh/regex module
This commit is contained in:
parent
4850116554
commit
967ff2f5cf
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2017-04-01 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Sebastian: 40782: Completion/Unix/Type/_hosts: avoid dependency
|
||||
on zsh/regex module
|
||||
|
||||
2017-03-30 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* Dag-Erling Smørgrav: 40915: Completion/BSD/Command/_kld: fix
|
||||
|
|
|
@ -50,12 +50,13 @@ if ! zstyle -a ":completion:${curcontext}:hosts" hosts _hosts; then
|
|||
# entries.
|
||||
() {
|
||||
local host
|
||||
local -a match mbegin mend
|
||||
khosts=()
|
||||
for host; do
|
||||
if [[ $host == *[*?]* ]]; then
|
||||
continue
|
||||
elif [[ $host =~ "\[(.*)\]:\d*" ]]; then
|
||||
khosts+=$match
|
||||
elif [[ $host = (#b)*\[(*)\]:[[:digit:]]#* ]]; then
|
||||
khosts+=${match[1]}
|
||||
else
|
||||
khosts+=$host
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue