zsh-users
 help / color / mirror / code / Atom feed
* zsh: no matches found
@ 2014-04-20 16:12 ugaciaka
  2014-04-20 16:18 ` Igor Sosa Mayor
  2014-04-20 16:38 ` Kurtis Rader
  0 siblings, 2 replies; 18+ messages in thread
From: ugaciaka @ 2014-04-20 16:12 UTC (permalink / raw)
  To: zsh-users

Hi,

I could try to use youtube-dl but I noticed that doesn't work with zsh.

 youtube-dl http://www.youtube.com/watch?v=6b5CKd8R3vY
zsh: no matches found: http://www.youtube.com/watch?v=6b5CKd8R3vY

Is it any .zshrc configuration?

With bash it worked, why?

Thank's
-- 
ugaciaka
http://about.me/ugaciaka


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

* Re: zsh: no matches found
  2014-04-20 16:12 zsh: no matches found ugaciaka
@ 2014-04-20 16:18 ` Igor Sosa Mayor
  2014-04-20 16:51   ` Sven Joachim
  2014-04-20 16:38 ` Kurtis Rader
  1 sibling, 1 reply; 18+ messages in thread
From: Igor Sosa Mayor @ 2014-04-20 16:18 UTC (permalink / raw)
  To: zsh-users

ugaciaka <ugaciaka@gmail.com> writes:

> Hi,
>
> I could try to use youtube-dl but I noticed that doesn't work with zsh.
>
>  youtube-dl http://www.youtube.com/watch?v=6b5CKd8R3vY
> zsh: no matches found: http://www.youtube.com/watch?v=6b5CKd8R3vY

strnage... which zsh version? With 5.0.5 it works perfectly... I think
it is maybe a problem with the slashes which are interpreted as path...

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::


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

* Re: zsh: no matches found
  2014-04-20 16:12 zsh: no matches found ugaciaka
  2014-04-20 16:18 ` Igor Sosa Mayor
@ 2014-04-20 16:38 ` Kurtis Rader
  2014-04-20 16:47   ` Kurtis Rader
  2014-04-21  7:26   ` ugaciaka
  1 sibling, 2 replies; 18+ messages in thread
From: Kurtis Rader @ 2014-04-20 16:38 UTC (permalink / raw)
  To: ugaciaka; +Cc: Zsh Users

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

You need to quote the URL. The question-mark is a file globbing character
in both bash and zsh. The difference is that in bash if it doesn't match a
file it is treated as a literal question-mark rather than a glob character.
Try this in both shells:

rm -f /tmp/abc
echo /tmp/a?c
touch /tmp/abc
echo /tmp/a?c


On Sun, Apr 20, 2014 at 9:12 AM, ugaciaka <ugaciaka@gmail.com> wrote:

> Hi,
>
> I could try to use youtube-dl but I noticed that doesn't work with zsh.
>
>  youtube-dl http://www.youtube.com/watch?v=6b5CKd8R3vY
> zsh: no matches found: http://www.youtube.com/watch?v=6b5CKd8R3vY
>
> Is it any .zshrc configuration?
>
> With bash it worked, why?
>
> Thank's
> --
> ugaciaka
> http://about.me/ugaciaka
>



-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

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

* Re: zsh: no matches found
  2014-04-20 16:38 ` Kurtis Rader
@ 2014-04-20 16:47   ` Kurtis Rader
  2014-04-21  7:26   ` ugaciaka
  1 sibling, 0 replies; 18+ messages in thread
From: Kurtis Rader @ 2014-04-20 16:47 UTC (permalink / raw)
  To: ugaciaka; +Cc: Zsh Users

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

Also, as with practically every zsh behavior you can configure it to behave
like bash or emit an error message. From "man zshexpn" in the "filename
generation" section:

       The word is replaced with a list of sorted filenames that match the
pattern.  If no  matching  pattern  is  found,  the
       shell  gives  an  error  message,  unless the NULL_GLOB option is
set, in which case the word is deleted; or unless the
       NOMATCH option is unset, in which case the word is left unchanged.



On Sun, Apr 20, 2014 at 9:38 AM, Kurtis Rader <krader@skepticism.us> wrote:

> You need to quote the URL. The question-mark is a file globbing character
> in both bash and zsh. The difference is that in bash if it doesn't match a
> file it is treated as a literal question-mark rather than a glob character.
> Try this in both shells:
>
> rm -f /tmp/abc
> echo /tmp/a?c
> touch /tmp/abc
> echo /tmp/a?c
>
>
> On Sun, Apr 20, 2014 at 9:12 AM, ugaciaka <ugaciaka@gmail.com> wrote:
>
>> Hi,
>>
>> I could try to use youtube-dl but I noticed that doesn't work with zsh.
>>
>>  youtube-dl http://www.youtube.com/watch?v=6b5CKd8R3vY
>> zsh: no matches found: http://www.youtube.com/watch?v=6b5CKd8R3vY
>>
>> Is it any .zshrc configuration?
>>
>> With bash it worked, why?
>>
>> Thank's
>> --
>> ugaciaka
>> http://about.me/ugaciaka
>>
>
>
>
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>



-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

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

* Re: zsh: no matches found
  2014-04-20 16:18 ` Igor Sosa Mayor
@ 2014-04-20 16:51   ` Sven Joachim
  2014-04-20 17:35     ` Igor Sosa Mayor
  0 siblings, 1 reply; 18+ messages in thread
From: Sven Joachim @ 2014-04-20 16:51 UTC (permalink / raw)
  To: zsh-users

On 2014-04-20 18:18 +0200, Igor Sosa Mayor wrote:

> ugaciaka <ugaciaka@gmail.com> writes:
>
>> Hi,
>>
>> I could try to use youtube-dl but I noticed that doesn't work with zsh.
>>
>>  youtube-dl http://www.youtube.com/watch?v=6b5CKd8R3vY
>> zsh: no matches found: http://www.youtube.com/watch?v=6b5CKd8R3vY
>
> strnage... which zsh version? With 5.0.5 it works perfectly...

Not by default.  Have you set the nonomatch option so that it works for
you?

> I think
> it is maybe a problem with the slashes which are interpreted as path...

No, it's because of the '?' character in the URL which causes globbing.

Cheers,
       Sven


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

* Re: zsh: no matches found
  2014-04-20 16:51   ` Sven Joachim
@ 2014-04-20 17:35     ` Igor Sosa Mayor
  2014-04-21 19:46       ` John Eikenberry
  0 siblings, 1 reply; 18+ messages in thread
From: Igor Sosa Mayor @ 2014-04-20 17:35 UTC (permalink / raw)
  To: zsh-users

Sven Joachim <svenjoac@gmx.de> writes:
> Not by default.  Have you set the nonomatch option so that it works for
> you?

no. nomatch is on; nonomatch is off. 

> No, it's because of the '?' character in the URL which causes globbing.

aha... interesting. Thanks for the explanation.

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::


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

* Re: zsh: no matches found
  2014-04-20 16:38 ` Kurtis Rader
  2014-04-20 16:47   ` Kurtis Rader
@ 2014-04-21  7:26   ` ugaciaka
  1 sibling, 0 replies; 18+ messages in thread
From: ugaciaka @ 2014-04-21  7:26 UTC (permalink / raw)
  To: Kurtis Rader; +Cc: Zsh Users

Ok, I understand now! tnx :.-)

2014-04-20 18:38 GMT+02:00 Kurtis Rader <krader@skepticism.us>:
> You need to quote the URL. The question-mark is a file globbing character in
> both bash and zsh. The difference is that in bash if it doesn't match a file
> it is treated as a literal question-mark rather than a glob character. Try
> this in both shells:
>
> rm -f /tmp/abc
> echo /tmp/a?c
> touch /tmp/abc
> echo /tmp/a?c
>
>
> On Sun, Apr 20, 2014 at 9:12 AM, ugaciaka <ugaciaka@gmail.com> wrote:
>>
>> Hi,
>>
>> I could try to use youtube-dl but I noticed that doesn't work with zsh.
>>
>>  youtube-dl http://www.youtube.com/watch?v=6b5CKd8R3vY
>> zsh: no matches found: http://www.youtube.com/watch?v=6b5CKd8R3vY
>>
>> Is it any .zshrc configuration?
>>
>> With bash it worked, why?
>>
>> Thank's
>> --
>> ugaciaka
>> http://about.me/ugaciaka
>
>
>
>
> --
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank



-- 
ugaciaka
http://about.me/ugaciaka


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

* Re: zsh: no matches found
  2014-04-20 17:35     ` Igor Sosa Mayor
@ 2014-04-21 19:46       ` John Eikenberry
  2014-04-22  6:02         ` lilydjwg
  2014-04-22 13:28         ` Igor Sosa Mayor
  0 siblings, 2 replies; 18+ messages in thread
From: John Eikenberry @ 2014-04-21 19:46 UTC (permalink / raw)
  To: zsh-users

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

Igor Sosa Mayor wrote:

> Sven Joachim <svenjoac@gmx.de> writes:
> > Not by default.  Have you set the nonomatch option so that it works for
> > you?
> 
> no. nomatch is on; nonomatch is off. 
> 
> > No, it's because of the '?' character in the URL which causes globbing.
> 
> aha... interesting. Thanks for the explanation.

If you're cutting-n-pasting these from the browser, the url-quote-magic zle
widget might be useful.


autoload -U url-quote-magic ; zle -N self-insert url-quote-magic


This will auto-quote/escape URLs when typed (or pasted) .

-- 

John Eikenberry
[ jae@zhar.net - http://zhar.net ]
[ PGP public key @ http://zhar.net/jae_at_zhar_net.gpg ]
________________________________________________________________________
Sic gorgiamus allos subjectatos nunc

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: zsh: no matches found
  2014-04-21 19:46       ` John Eikenberry
@ 2014-04-22  6:02         ` lilydjwg
  2014-04-22  7:05           ` Bart Schaefer
  2014-04-22 13:28         ` Igor Sosa Mayor
  1 sibling, 1 reply; 18+ messages in thread
From: lilydjwg @ 2014-04-22  6:02 UTC (permalink / raw)
  To: John Eikenberry, zsh-users

On Mon, Apr 21, 2014 at 12:46:18PM -0700, John Eikenberry wrote:
> If you're cutting-n-pasting these from the browser, the url-quote-magic zle
> widget might be useful.
> 
> 
> autoload -U url-quote-magic ; zle -N self-insert url-quote-magic
> 
> 
> This will auto-quote/escape URLs when typed (or pasted) .

Hi, I find url-quote-magic is great for literal URLs, but when I try to
paste some code with variables in URLs it breaks.  Is there a toggle
key/function or something to temporarily disable url-quote-magic?  Now
I have to edit the config then restart to get away with it :-(


-- 
Best regards,
lilydjwg


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

* Re: zsh: no matches found
  2014-04-22  6:02         ` lilydjwg
@ 2014-04-22  7:05           ` Bart Schaefer
  2014-04-24  4:10             ` lilydjwg
  0 siblings, 1 reply; 18+ messages in thread
From: Bart Schaefer @ 2014-04-22  7:05 UTC (permalink / raw)
  To: zsh-users

On Apr 22,  2:02pm, lilydjwg wrote:
}
} Hi, I find url-quote-magic is great for literal URLs, but when I try to
} paste some code with variables in URLs it breaks.  Is there a toggle
} key/function or something to temporarily disable url-quote-magic?

zle -A .self-insert self-insert

should take care of it.  If you want that bound to a key, something like

toggle-uqm() {
  if zle -l self-insert
  then zle -A .self-insert self-insert && zle -M self-insert
  else zle -N self-insert url-quote-magic && zle -M url-quote-magic
  fi
}
zle -N toggle-uqm
bindkey '^X$' toggle-uqm	# Choose your preferred binding


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

* Re: zsh: no matches found
  2014-04-21 19:46       ` John Eikenberry
  2014-04-22  6:02         ` lilydjwg
@ 2014-04-22 13:28         ` Igor Sosa Mayor
  1 sibling, 0 replies; 18+ messages in thread
From: Igor Sosa Mayor @ 2014-04-22 13:28 UTC (permalink / raw)
  To: zsh-users

John Eikenberry <jae@zhar.net> writes:

> If you're cutting-n-pasting these from the browser, the url-quote-magic zle
> widget might be useful.
>
> autoload -U url-quote-magic ; zle -N self-insert url-quote-magic

aha... thanks, good tip!

-- 
:: Igor Sosa Mayor     :: joseleopoldo1792@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::


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

* Re: zsh: no matches found
  2014-04-22  7:05           ` Bart Schaefer
@ 2014-04-24  4:10             ` lilydjwg
  0 siblings, 0 replies; 18+ messages in thread
From: lilydjwg @ 2014-04-24  4:10 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

On Tue, Apr 22, 2014 at 12:05:11AM -0700, Bart Schaefer wrote:
> On Apr 22,  2:02pm, lilydjwg wrote:
> }
> } Hi, I find url-quote-magic is great for literal URLs, but when I try to
> } paste some code with variables in URLs it breaks.  Is there a toggle
> } key/function or something to temporarily disable url-quote-magic?
> 
> zle -A .self-insert self-insert
> 
> should take care of it.  If you want that bound to a key, something like
> 
> toggle-uqm() {
>   if zle -l self-insert
>   then zle -A .self-insert self-insert && zle -M self-insert
>   else zle -N self-insert url-quote-magic && zle -M url-quote-magic
>   fi
> }
> zle -N toggle-uqm
> bindkey '^X$' toggle-uqm	# Choose your preferred binding

Thanks!

-- 
Best regards,
lilydjwg


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

* Re: zsh: no matches found
  2005-03-21  1:04   ` Toshiro
  2005-03-21  1:08     ` Clint Adams
@ 2005-03-21 16:45     ` Wayne Davison
  1 sibling, 0 replies; 18+ messages in thread
From: Wayne Davison @ 2005-03-21 16:45 UTC (permalink / raw)
  To: Toshiro; +Cc: zsh-users

On Sun, Mar 20, 2005 at 11:04:44PM -0200, Toshiro wrote:
> Is this the only way? In other shells this is implemented in a very
> simple way, if the wildcard can be expanded, then it is expanded,
> otherwise an asterisk is sent as an argument to the application. 

Yes, other shells do it that way, but that has its downsides.  For
instance, if you run "touch *,c" it's better to get "no match" rather
than creating a useless *,c file.  Or if you type a command like this:
"rsync -avP *.html *.shmtl *.php host:/dest/" (note the misspelling),
it is better to get a "no match" error right away than to get a single
open-error embedded in all the output that you then have to figure out
at the end of the transfer.  I much prefer to simply put single quotes
around any wild-carded file names that should not be expanded rather
than to configure the shell to include a wildcard that didn't match
anything.  YMMV, of course, but if you give it a try, you may find that
you come to prefer it as well.

..wayne..


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

* Re: zsh: no matches found
  2005-03-21  1:08     ` Clint Adams
@ 2005-03-21  2:36       ` Toshiro
  0 siblings, 0 replies; 18+ messages in thread
From: Toshiro @ 2005-03-21  2:36 UTC (permalink / raw)
  To: zsh-users

> > Is this the only way? In other shells this is implemented in a very
> > simple way, if the wildcard can be expanded, then it is expanded,
> > otherwise an asterisk is sent as an argument to the application.
>
> Look in the documentation for options NOMATCH and NULL_GLOB.

Adding 'setopt NONOMATCH' to /etc/zsh/zshrc made it. Thank you for your help!

Toshiro.


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

* Re: zsh: no matches found
  2005-03-21  1:04   ` Toshiro
@ 2005-03-21  1:08     ` Clint Adams
  2005-03-21  2:36       ` Toshiro
  2005-03-21 16:45     ` Wayne Davison
  1 sibling, 1 reply; 18+ messages in thread
From: Clint Adams @ 2005-03-21  1:08 UTC (permalink / raw)
  To: Toshiro; +Cc: zsh-users

> Is this the only way? In other shells this is implemented in a very simple 
> way, if the wildcard can be expanded, then it is expanded, otherwise an 
> asterisk is sent as an argument to the application. 

Look in the documentation for options NOMATCH and NULL_GLOB.


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

* Re: zsh: no matches found
  2005-03-21  0:47 ` Dan Nelson
@ 2005-03-21  1:04   ` Toshiro
  2005-03-21  1:08     ` Clint Adams
  2005-03-21 16:45     ` Wayne Davison
  0 siblings, 2 replies; 18+ messages in thread
From: Toshiro @ 2005-03-21  1:04 UTC (permalink / raw)
  To: zsh-users

> In the last episode (Mar 20), Toshiro said:
> > Every time I type something like 'find . -name *log' I get the error:
> >  zsh: no matches found
> > when there's no file matching the wildcard in the current directory.
> > Is there any way to change this behaviour? (I don't want to escape every
> > asterisk I type).
>
> alias find="noglob find"
>
> will work in this case.  You don't want to do it globally, though,
> since almost all commands expect the shell to expand wildcards for
> them.

Is this the only way? In other shells this is implemented in a very simple 
way, if the wildcard can be expanded, then it is expanded, otherwise an 
asterisk is sent as an argument to the application. 

Why is it so complex in zsh? What are the advantages of this implementation?

Toshiro.


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

* Re: zsh: no matches found
  2005-03-21  0:38 Toshiro
@ 2005-03-21  0:47 ` Dan Nelson
  2005-03-21  1:04   ` Toshiro
  0 siblings, 1 reply; 18+ messages in thread
From: Dan Nelson @ 2005-03-21  0:47 UTC (permalink / raw)
  To: Toshiro; +Cc: zsh-users

In the last episode (Mar 20), Toshiro said:
> Every time I type something like 'find . -name *log' I get the error:
>  zsh: no matches found
> when there's no file matching the wildcard in the current directory.
> Is there any way to change this behaviour? (I don't want to escape every 
> asterisk I type).

alias find="noglob find"

will work in this case.  You don't want to do it globally, though,
since almost all commands expect the shell to expand wildcards for
them.

-- 
	Dan Nelson
	dnelson@allantgroup.com


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

* zsh: no matches found
@ 2005-03-21  0:38 Toshiro
  2005-03-21  0:47 ` Dan Nelson
  0 siblings, 1 reply; 18+ messages in thread
From: Toshiro @ 2005-03-21  0:38 UTC (permalink / raw)
  To: zsh-users

Every time I type something like 'find . -name *log' I get the error:
 zsh: no matches found
when there's no file matching the wildcard in the current directory.
Is there any way to change this behaviour? (I don't want to escape every 
asterisk I type).

Toshiro.


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

end of thread, other threads:[~2014-04-24  4:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-20 16:12 zsh: no matches found ugaciaka
2014-04-20 16:18 ` Igor Sosa Mayor
2014-04-20 16:51   ` Sven Joachim
2014-04-20 17:35     ` Igor Sosa Mayor
2014-04-21 19:46       ` John Eikenberry
2014-04-22  6:02         ` lilydjwg
2014-04-22  7:05           ` Bart Schaefer
2014-04-24  4:10             ` lilydjwg
2014-04-22 13:28         ` Igor Sosa Mayor
2014-04-20 16:38 ` Kurtis Rader
2014-04-20 16:47   ` Kurtis Rader
2014-04-21  7:26   ` ugaciaka
  -- strict thread matches above, loose matches on Subject: below --
2005-03-21  0:38 Toshiro
2005-03-21  0:47 ` Dan Nelson
2005-03-21  1:04   ` Toshiro
2005-03-21  1:08     ` Clint Adams
2005-03-21  2:36       ` Toshiro
2005-03-21 16:45     ` Wayne Davison

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).