z icon indicating copy to clipboard operation
z copied to clipboard

First run issue

Open kevinSuttle opened this issue 11 years ago • 25 comments

~
❯ cddf #alias for 'cd ~/Code/dotfiles' 
_z:22: no such file or directory: /Users/kevinsuttle/.z

Any ideas? Seems to only have happened on first invocation. My dotfiles are all symlinks in ~, pointing to the above directory, if that helps. Homebrew installed version of z.

kevinSuttle avatar Jan 14 '14 21:01 kevinSuttle

I think I see what's going on and will try to get a fix committed soon.

rupa avatar Jan 16 '14 18:01 rupa

Thanks @rupa

kevinSuttle avatar Jan 16 '14 19:01 kevinSuttle

I try to reproduce the problem without success

rm ~/.z
alias cddf='cd ~/src/dotfiles'
cddf

@kevinSuttle , you use bash o zsh?

maybe if you enable debug of bash, you can get more information about the problem

set -x # enable debug
rm ~/.z
alias cddf='cd ~/src/dotfiles'
cddf
set +x 

juanpabloaj avatar Jun 27 '14 18:06 juanpabloaj

I use zsh

kevinSuttle avatar Jun 28 '14 03:06 kevinSuttle

yeah, hmm, I thought i knew what the deal was but it turned out I didn't ... then I forgot about this. Knowing it's from a zsh user might help (I'm not one though) ...

rupa avatar Jul 10 '14 03:07 rupa

I see the same thing on first run, also using zsh.

SaintGimp avatar Jul 17 '14 02:07 SaintGimp

I am also seeing this issue from zsh.

michaelorr avatar Apr 14 '15 14:04 michaelorr

+1 on this issue, just got it...

thatryan avatar May 01 '15 03:05 thatryan

I also see this issue on zsh. z version: d5adc9a6239c2ee44309fd78bca68f301eb0d45a zsh --version: zsh 5.0.8 (x86_64-unknown-linux-gnu)

langston-barrett avatar Jul 09 '15 16:07 langston-barrett

OK, I'll have another go at this ASAP

rupa avatar Jul 09 '15 19:07 rupa

Thanks @rupa !

michaelorr avatar Jul 10 '15 15:07 michaelorr

Downloaded today, same issue while running ". ./z.sh" Workaround: run bash, then ". ./z.sh", then exit bash.

FedericoCeratto avatar Dec 12 '15 21:12 FedericoCeratto

I had the same problem, and I did what @FedericoCeratto suggested. not sure if it's from this or from the restart of the zsh, but it now works.

danipralea avatar Mar 05 '16 08:03 danipralea

Have the same issue on fresh run of vagrant when trying to cd into "/home"

_z:22: no such file or directory: /home/vagrant/.z

Even with the error it does cd me into home directory.

But the error does not show when trying to cd into home again.

Seems like it only happens on first run.

BaldwinKoo avatar Jan 03 '17 08:01 BaldwinKoo

I'm having this issue now

davidawad avatar Jun 05 '17 16:06 davidawad

fyi just got this, first run after install. zsh user too. Great project, thank you!

cd Documents/Code _z:22: no such file or directory: /Users/choey/.z

choeyio avatar Sep 22 '17 05:09 choeyio

Same error for me as well, please look into it ASAP.

ryzokuken avatar Dec 12 '17 18:12 ryzokuken

Me too!

aravindballa avatar Jan 13 '18 16:01 aravindballa

Same here!

schu34 avatar Mar 22 '18 19:03 schu34

I have this error at the first run after install. After it's OK.

felipeporto avatar Mar 29 '18 04:03 felipeporto

Same issue, but seems to work just fine after the error is reported.

Repro steps:

  1. new Mac (expensive step!) I'm also using oh-my-zsh.
  2. brew install z
  3. add . /usr/local/etc/profile.d/z.sh to .zshrc
  4. open new terminal window (I'm using iTerm) and follow along…
    Last login: Fri Dec 13 07:42:48 on ttys001
    >  ~ cd Documents
    _z:22: no such file or directory: /Users/beau/.z
    >  Documents cd ..
    >  ~ z doc
    >  Documents
    

beausmith avatar Dec 14 '19 15:12 beausmith

yup, it's also happened in my terminal

~
❯ brew install z
==> Downloading https://github.com/rupa/z/archive/v1.9.tar.gz
==> Downloading from https://codeload.github.com/rupa/z/tar.gz/v1.9
##O#- #
==> Caveats
For Bash or Zsh, put something like this in your $HOME/.bashrc or $HOME/.zshrc:
  . /usr/local/etc/profile.d/z.sh
==> Summary
🍺  /usr/local/Cellar/z/1.9: 5 files, 20.7KB, built in 5 seconds

~ 8s
❯ cd Workspace

~/Workspace
❯ z wo
zsh: command not found: z

~/Workspace
❯ vim ~/.zshrc # add . /usr/local/etc/profile.d/z.sh

~/Workspace 10s
❯ source ~/.zshrc

_z:22: no such file or directory: /Users/shaw/.z

shaodahong avatar Dec 17 '19 09:12 shaodahong

like after fist install, .z not found when is using, should check .z exist

shaodahong avatar Dec 17 '19 09:12 shaodahong

This seems to be a harmless error. After first-run shows this error, then ~/.z exists and the z command works.

trusktr avatar Apr 06 '20 22:04 trusktr

Bump #256.

Nezteb avatar May 18 '20 06:05 Nezteb