2012-12-30 60 views
2

autojump由於某種原因,Archlinux不能在zsh中工作。
雖然如果我切換到bash它工作正常。無法使用archlinux上的zsh源自動跳轉腳本

$ sudo pacman -S autojump 

autojump:不上zsh

$ source /usr/etc/profile.d/autojump.sh 
$ j 
zsh: command not found: j 

$ source /usr/etc/profile.d/autojump.bash 
$ j 
zsh: command not found: j 

autojump工作:在bash

$ bash 
(bash) $ source /usr/etc/profile.d/autojump.bash 
(bash) $ j 
autojump: ... 

我的工作環境:

$ echo $SHELL 
/bin/zsh 

$ zsh --version 
zsh 5.0.2 (x86_64-unknown-linux-gnu) 

我在OS X上使用了自動跳轉功能zsh,所以它對我來說也不像zsh特定的問題。

+0

在我Antergos(基於arch)autojump被放置在/etc/profile.d/autojump.zsh上,我的oh-my-zsh有一個j鍵的別名。把 [[-s /etc/profile.d/autojump.zsh]] &&。 /etc/profile.d/autojump。zsh 在你的〜/ .zshrc – SergioAraujo

回答

1

沒有/usr/etc/profile.d/autojump.zshautojump通過pacman安裝推。我不知道爲什麼會這樣。

但是,我執行了手動用戶安裝,並在我的zsh配置中添加了autojump插件,用於處理源文件。

2

是不是應該用autojump.zsh代替?

雖然從我看到的唯一的事情autojump.sh正在做的是從一些地方採購autojump.zshautojump.bash所以它應該與.sh工作。如果維修人員已修補,則工作autojump.sh:它不希望在/usr/etc中找到自動跳轉。

如果它不能與autojump.zsh一起使用,請輸出做(set -x ; source /usr/etc/profile.d/autojump.zsh)的輸出。

0

無論採用.zsh版本,ZSH中的Autojump都會一再出現問題。我從來沒有找到一個體面的修復,並最終選擇堅持與ZSH和停止使用 Autojump。

我個人的解決方案是從Autojump切換到FASD。它通過'z'別名具有相同的功能Autojump。它還允許專門跳轉到文件或目錄。

FASD一直是我的ZSH設置的可靠部分,超越了Autojump的功能。我寫了我的胎兒酒精中毒綜合症的經驗,在我的博客上更大的長度在Civet.ws

0

我已經嘗試了上面的方法,但我通過添加

source ~/.autojump/etc/profile.d/autojump.zsh 

解決了這個問題,因爲我還沒有找到/usr/etc/profile.d/autojump.zsh