You are not logged in.

#1 2011-02-12 04:00:14

miguecosa
Member
Registered: 2010-02-20
Posts: 9

Help with zsh and autocd option

I have installed zsh an I'm beginning to use it.
I added "setopt autocd" to mi .zshrc file.
Now if I type "/etc" it cd's to that directory without the need to type the cd command before.
But if I'm in my home directory and I write "Videos" it doesn't changes to that directory placed in my home directory.
So it seems that this option is only working with the full path. That's not very practical. I'd rather type "cd" than full path.
In bash it is possible to make it work as I want, and I guess that it is possible in zsh.
What am I missing?
Thanks in advance, and sorry if it is a stupid question.

Offline

#2 2011-02-12 04:42:27

hellnest
Member
From: $ dmesg | grep ATA
Registered: 2010-11-11
Posts: 194
Website

Re: Help with zsh and autocd option

it's working on mine. try vid<tab>


roll Snapping my own life roll
hmmgithubhmm
coolMyBlogcool

Offline

#3 2011-02-12 13:28:59

miguecosa
Member
Registered: 2010-02-20
Posts: 9

Re: Help with zsh and autocd option

Thanks for the answer.
That's exactly what I'm trying, and I hear the annoying beep.
In other words, i want the shell to behave as bash with the "shopt -s autocd".
Is it a bug? I'm using zsh-git package from AUR, but first I installed zsh package and behavior was the same
Here is my .zshrc

#Options for Zsh
setopt autocd 
#This is for auto ls after cding
function chpwd() {
    emulate -LR zsh
    ls
}
#This is for autojump
. /etc/profile

Any ideas?

Last edited by miguecosa (2011-02-12 13:32:58)

Offline

#4 2011-02-12 22:32:11

miguecosa
Member
Registered: 2010-02-20
Posts: 9

Re: Help with zsh and autocd option

I've figured it out: I added this to mi .zshrc, now it works:

autoload -U compinit
compinit

Offline

Board footer

Powered by FluxBB