zsh-workers
 help / color / mirror / code / Atom feed
* bug report about zsh
@ 2018-08-20  1:56 air azure
  2018-08-20 17:20 ` Jun T.
  2018-08-22 15:33 ` Sebastian Gniazdowski
  0 siblings, 2 replies; 7+ messages in thread
From: air azure @ 2018-08-20  1:56 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

version:
zsh 5.5.1-2 (x86_64)
<https://www.archlinux.org/packages/extra/x86_64/zsh/> with
no configuration files on arch linux(latest, after pacman -Syu)

bug description:
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

however, on bash 4.4.023-1 (x86_64)
<https://www.archlinux.org/packages/core/x86_64/bash/>, run the same
command and it works.

Waiting for replies!

BC

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug report about zsh
  2018-08-20  1:56 bug report about zsh air azure
@ 2018-08-20 17:20 ` Jun T.
  2018-08-20 17:30   ` Bart Schaefer
  2018-08-22 15:33 ` Sebastian Gniazdowski
  1 sibling, 1 reply; 7+ messages in thread
From: Jun T. @ 2018-08-20 17:20 UTC (permalink / raw)
  To: zsh-workers


> 2018/08/20 10:56, air azure <blucmt@gmail.com> 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 [:@] ?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug report about zsh
  2018-08-20 17:20 ` Jun T.
@ 2018-08-20 17:30   ` Bart Schaefer
  2018-08-21  3:24     ` Jun T
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2018-08-20 17:30 UTC (permalink / raw)
  To: Jun T.; +Cc: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

On Mon, Aug 20, 2018, 10:21 AM Jun T. <takimoto-j@kba.biglobe.ne.jp> wrote:

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

The colon is there so you can specify a port number, I think. We would need
some special handling for the square brackets around the IPv6 IP address.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug report about zsh
  2018-08-20 17:30   ` Bart Schaefer
@ 2018-08-21  3:24     ` Jun T
  2018-08-21 10:36       ` Daniel Shahaf
  0 siblings, 1 reply; 7+ messages in thread
From: Jun T @ 2018-08-21  3:24 UTC (permalink / raw)
  To: zsh-workers


> 2018/08/21 2:30, Bart Schaefer <schaefer@brasslantern.com> wrote:
> 
> On Mon, Aug 20, 2018, 10:21 AM Jun T. <takimoto-j@kba.biglobe.ne.jp> wrote:
> 
>> Do we need to fix this? If so, then how? Can we just remove
>> the ':' from the pattern [:@] ?
>> 
> The colon is there so you can specify a port number, I think.

User *can* specify a port number but it is just ignored.

In _user_at_host, _combination is called with style 'users-hosts', not
'users-hosts-ports'. For example,

% zstyle ':completion:*' users-hosts 'foo@host.com:123'

% sshfs f<TAB><TAB>
% finger f<TAB><TAB>
% dsh -m f<TAB><TAB>

all of these complete to foo@host.com and the 123 will never be offered.
So I wonder why : is in the pattern [:@]. Is it just to ignore the
port number (if it exists)?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug report about zsh
  2018-08-21  3:24     ` Jun T
@ 2018-08-21 10:36       ` Daniel Shahaf
  2018-08-22 11:43         ` Jun T
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Shahaf @ 2018-08-21 10:36 UTC (permalink / raw)
  To: zsh-workers

Jun T wrote on Tue, 21 Aug 2018 12:24 +0900:
> all of these complete to foo@host.com and the 123 will never be offered.
> So I wonder why : is in the pattern [:@]. Is it just to ignore the
> port number (if it exists)?

The 'else' branch deals exclusively with the portion before the "@" sign
of the (incomplete) "user@host" word on the command line.

The ':' there allows values of the users-hosts style to use colons, as in:

zstyle '*' users-hosts danielsh:localhost


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug report about zsh
  2018-08-21 10:36       ` Daniel Shahaf
@ 2018-08-22 11:43         ` Jun T
  0 siblings, 0 replies; 7+ messages in thread
From: Jun T @ 2018-08-22 11:43 UTC (permalink / raw)
  To: zsh-workers


> 2018/08/21 19:36, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> 
> The ':' there allows values of the users-hosts style to use colons, as in:
> 
> zstyle '*' users-hosts danielsh:localhost

If this need be supported, then I think it would be better to leave
_user_at_host unchanged for the moment.

# I have never used IPv6 and don't know how often typical users need to
# type numeric address (instead of host name) on the command line.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: bug report about zsh
  2018-08-20  1:56 bug report about zsh air azure
  2018-08-20 17:20 ` Jun T.
@ 2018-08-22 15:33 ` Sebastian Gniazdowski
  1 sibling, 0 replies; 7+ messages in thread
From: Sebastian Gniazdowski @ 2018-08-22 15:33 UTC (permalink / raw)
  To: blucmt; +Cc: Zsh hackers list

On Mon, 20 Aug 2018 at 03:56, air azure <blucmt@gmail.com> wrote:
>
> version:
> zsh 5.5.1-2 (x86_64)
> <https://www.archlinux.org/packages/extra/x86_64/zsh/> with
> no configuration files on arch linux(latest, after pacman -Syu)
>
> bug description:
> 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

You can also do:
alias ssh='noglob ssh'


-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-22 15:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20  1:56 bug report about zsh air azure
2018-08-20 17:20 ` Jun T.
2018-08-20 17:30   ` Bart Schaefer
2018-08-21  3:24     ` Jun T
2018-08-21 10:36       ` Daniel Shahaf
2018-08-22 11:43         ` Jun T
2018-08-22 15:33 ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).