* cd with wildcard fails instead cd's to home
@ 2021-04-27 12:46 zzapper
2021-04-27 14:01 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: zzapper @ 2021-04-27 12:46 UTC (permalink / raw)
To: zsh-users
Hi
# my environment
# trying to cd to a directory that doesn't exist with a wildcard I just
want it fail
~/Videos/kdenlivedemo > cd gggg
cd: no such file or directory: gggg
~/Videos/kdenlivedemo >
~/Videos/kdenlivedemo > cd gggg*
~ > # <<<< BAD I've cd'd to home -- no warning message
~ > which cd
cd: shell built-in command
zsh -f # clean enviroment
~/Videos/kdenlivedemo > cd gggg
cd: no such file or directory: gggg
~/Videos/kdenlivedemo > cd *gggg
zsh: no matches found: *gggg
~/Videos/kdenlivedemo > ## <<< GOOD I stay where I am
Please tell me it's something dumb!
zzapper
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cd with wildcard fails instead cd's to home
2021-04-27 12:46 cd with wildcard fails instead cd's to home zzapper
@ 2021-04-27 14:01 ` Peter Stephenson
2021-04-27 14:50 ` zzapper
0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2021-04-27 14:01 UTC (permalink / raw)
To: zzapper, zsh-users
> On 27 April 2021 at 13:46 zzapper <zsh@rayninfo.co.uk> wrote:
> ~/Videos/kdenlivedemo > cd gggg*
> ~ > # <<<< BAD I've cd'd to home -- no warning message
You've got the NULL_GLOB option set, which simply removes any argument
with pattern characters in that doesn't match.
It's not a common thing to have set, you'd better try to work out
why you have it.
If there is a reason, think about CSH_NULL_GLOB instead --- that
will throw in error if *all* patterns fail, as in this case.
Go to
http://zsh.sourceforge.net/Guide/zshguide02.html#l13
and search down for CSH_NULL_GLOB for more on the related options.
pws
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cd with wildcard fails instead cd's to home
2021-04-27 14:01 ` Peter Stephenson
@ 2021-04-27 14:50 ` zzapper
0 siblings, 0 replies; 3+ messages in thread
From: zzapper @ 2021-04-27 14:50 UTC (permalink / raw)
To: zsh-users
On 27/04/2021 15:01, Peter Stephenson wrote:
> On 27 April 2021 at 13:46 zzapper <zsh@rayninfo.co.uk> wrote:
>> ~/Videos/kdenlivedemo > cd gggg*
>> ~ > # <<<< BAD I've cd'd to home -- no warning message
> You've got the NULL_GLOB option set, which simply removes any argument
> with pattern characters in that doesn't match.
PWS,
>>> thanks that was it. <<<<
#setopt nullglob # stops a glob barfing if no matches <<< NOT EVEN
SURE THAT EVEN HELPED JUST A BIT OF FORGOTTEN CLUDGE in my .zshrc
It was stopping a longish script from working but it took me ages to
isolate the problem.
I eventually whittled the script down to the one line that was the
culprit but a ton of red herrings on the journey !!
echo "Now can you give me back 6 hours of my life back LOL"
zzapper
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-27 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 12:46 cd with wildcard fails instead cd's to home zzapper
2021-04-27 14:01 ` Peter Stephenson
2021-04-27 14:50 ` zzapper
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).