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

Re: bug report about zsh



> 2018/08/20 10:56, air azure <blucmt@xxxxxxxxx> wrote:
> 
> Mount sshfs from an ipv6 server, on zsh you input
> sshfs xxxx@[yyyy:yy::yy]:/zzz ~/remote
> 
> zsh report back
> zsh: no matches found: xxxx@[yyyy:yy::yy]:/zzz

[1] (reply to azure) This is not a bug:
As you know, '[...]' on the command line is considered as a
file name generation pattern (glob pattern) like '*' and '?'.
Consider, for example, a pattern f[aio]x. If there are files
named 'fax', 'fix' or 'fox' then the pattern is replaced by
(a list of) those file names. But if none of the files exists
then (by default) bash leaves the pattern as is, i.e.,
    echo f[aio]x
will print 'f[aio]x', while zsh gives 'no match found' warning.
You can change this default behavior by
    zsh% unsetopt nomatch

But it would be better to escape the pattern, as
    zsh% sshfs 'xxxx@[yyyy:yy::yy]:/zzz' ~/remote
or
    zsh% sshfs xxxx@\[yyyy:yy::yy\]:/zzz ~/remote

[2] But (to zsh workers)
The current completion function for the sshfs command does not
work well with numeric IPv6 addresses. For example, If we use
    zsh% zstyle ':completion:*:sshfs:*:accounts' users-hosts \
                 'foo@12.34.56.78' 'bar@[12:34::5678]'
then
    zsh% sshfs f<TAB>
works but
    zsh% sshfs b<TAB>
does not. This is due to the option -s '[:@]' passed to
_combination in _user_at_host.

Do we need to fix this? If so, then how? Can we just remove
the ':' from the pattern [:@] ?



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