LoginSignup
ohakutsu
@ohakutsu

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

oh my zshのlib/directoriesの...がうまく動かない

oh-my-zshlib/directories...がうまく動かず困っています。
自分なりに調べてみましたが、原因がわからない状態です。
原因だろうと思うものがありましたら、教えて下さい!

# 動かないもの

...
....
.....
......
# 実行するとどうなるか

$ ...
zsh: permission denied: ../..
.zshrc
# .zshrcの中身

# zplug
source ~/.zplug/init.zsh

zplug 'zplug/zplug', hook-build:'zplug --self-manage'

zplug "mafredri/zsh-async"

zplug "lib/directories", from:oh-my-zsh

# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
    printf "Install? [y/N]: "
    if read -q; then
        echo; zplug install
    fi
fi

zplug load
0

2Answer

Comments

  1. @ohakutsu

    Questioner
    なるほど、"..."ではなく、"cd ..."ということですね。
    ありがとうございます!

... だけでも動きますが、 setopt auto_cd オプションが有効になっている必要があります。(auto_cd は入力されたコマンドが存在せず、同名のディレクトリが存在するなら自動で cd する設定です)

$ setopt auto_cd # ~/.zshrc などに書いておく
$ pwd
~/tmp/foo
$ ...
$ pwd
~/tmp

それでも zsh: permission denied: ../.. が出るなら、移動先のディレクトリが存在しない、つまりカレントディレクトリに移動した後で親ディレクトリが削除された可能性が考えられます。

1

Your answer might help someone💌