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

Re: PATCH: Update _bind_addresses to work with new ifconfig output (and old).



On Sat, Dec 10, 2011 at 09:26:46PM +0100, Mikael Magnusson wrote:

> Thanks, I've updated the patch. Does it complete ipv6 addresses if you
> add 6(#c0,1) after the second inet instead?
> ${${${(M)${(f)"$(ifconfig -a)"}:#*inet*}##*inet6(#c0,1) (addr:)(#c0,1)}%% *}

Yes, but, as you saw, with the network prefix length, too.  Putting that
expression in ${...%/<->} seems to remove the length for me.

> But maybe if it's an inet6 it should also be surrounded by [], I'm not
> super familiar with ipv6 and what programs expect since I don't use it.

Yeah, I'm not positive what ssh expects here.  Looks like either

    [<address>]:<port>

or

    <address>/port

would work, which makes sense, as neither syntax is ambiguous.  But the ssh
on Solaris is forked from openssh, so I can't say how a pure openssh
implementation would be.

Danek



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