VaT*_*aTo 10 macos osx-yosemite
我在我的Mac OSX Yosemite上使用brew安装了autojump
brew install autojump
Run Code Online (Sandbox Code Playgroud)
现在,我无法使用它,因为当我尝试使用它时:
jc asfg
-bash: jc: command not found
jo asfg
-bash: jo: command not found
j asdj
-bash: j: command not found
Run Code Online (Sandbox Code Playgroud)
它们都不存在.关于我做错了什么的任何建议?
谢谢
rho*_*mes 11
如果您还没有这样做,可能需要按照我最近安装时的说明进行操作:
Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember
to source the file to update your current session):
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
Run Code Online (Sandbox Code Playgroud)
例如,如果您将行添加到.bash_profile,则可以按如下方式获取:
. ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)
或者,只需启动一个新的命令shell,变量就应该生效了.
如果你没有取得任何成功,那就是时候严重麻烦了.
如果安装正确,您应该在brew目录下有一个名为autojump.sh的文件(您可以看到它使用brew --prefix).如果该文件存在,您应该能够执行以下命令,该命令应该暂时允许在该特定shell中使用autojump命令:
. $(brew --prefix)/etc/profile.d/autojump.sh
Run Code Online (Sandbox Code Playgroud)
如果您成功使用autojump命令,则需要修改.bashrc或.zshrc文件,如本答案顶部所述.
如果autojump命令仍然无处可见,我会尝试"brew uninstall autojump",接着是"brew install autojump".哦,请确保完全遵循安装成功后"警告"部分中的说明.
Assumed that you use zsh shell, you have to manually add the plugin link.
See the instructions blew:
in your terminal, open and edit .zshrc file by nano or vim:
$ nano ~/.zshrc or $ vim ~/.zshrc
re-open your terminal
| 归档时间: |
|
| 查看次数: |
1338 次 |
| 最近记录: |