You are not logged in.

#1 2014-01-18 21:22:23

MagmaCode
Member
Registered: 2014-01-18
Posts: 18

zsh gobbling problem

I've recently decided to try out zsh and the only problem so far is that when i try to execute 'cd Do*' (being in my home directory) , the output is "cd:cd:8: string not in pwd: Documents"

so is there a function or something that can fix  it ?

P.S: Sorry if i posted in the wrong section but i am a newbie :))

Offline

#2 2014-01-18 21:27:50

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: zsh gobbling problem

I get a slightly different message*, but I think the problem is that you have multiple matches to "Do*". (Probably Documents and Downloads).

Why are you using globbing for cd anyway? I'd just press tab and use autocompletion.

*

$ cd Do* 
cd: string not in pwd: Documents

Edit: related?

Last edited by WorMzy (2014-01-18 21:30:37)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2014-01-18 21:29:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: zsh gobbling problem

Hmm... works for me.  I am using grml-zsh-config in addition to zsh.  My ~/.zshrc is in my sig.

Offline

#4 2014-01-18 21:38:04

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: zsh gobbling problem

zsh's cd is more powerful than bash's. Look at `man zshbuiltins`. You apparently have exactly two matches for "Do*", so zsh thinks you're trying to use the second form, which performs a substitution on the name of the pwd, but that fails because pwd does not contain "Documents".

I agree that this seems like a weird thing to do. Using tab completion, you would have noticed that the "Do" prefix does not produce a unique match.

Last edited by Raynman (2014-01-18 21:38:32)

Offline

Board footer

Powered by FluxBB