我在OS X Yosemite上遇到的问题是:
自动跳转v22.2.4 (https://github.com/joelthelion/autojump),通过别名
j
返回我想跳到的路径,但不执行实际的跳转。
可悲的解决办法是复制返回的路径并将其添加到cd命令中。
j work
/Users/peterlustig/Documents/workspace/
# now copy the resulting path manually
cd /Users/peterlustig/Documents/workspace/
这个问题仍然存在于终端和iterm2中。之后,我遵循了安装后的说明。
brew install autojump
再加上
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
到我的侧写。
编辑:
jc work
让我跳到我的“工作区”目录(在打印到工作区目录的路径之后)。现在,有什么问题
j
发布于 2015-06-02 11:35:51
我让它起作用了,我建议你做下面的事:
brew
安装我,那么您可能添加了(那里有.sh
文件):
[ -s $(brew -前缀)/etc/profile.d/autojump.sh] &&。$(brew -前缀)/etc/profile.d/autojump.sh我正在运行bash,并且不知道有不同的shell可以包括:
# have a look in:
/usr/local/etc
# you should see mutliple shell scripts to include (depending on your env):
autojump.bash -> ../Cellar/autojump/21.7.1/etc/autojump.bash
autojump.sh -> ../Cellar/autojump/21.7.1/etc/autojump.sh
autojump.zsh -> ../Cellar/autojump/21.7.1/etc/autojump.zsh
/usr/local/etc/profile.d
,只有/usr/local/etc
。将命令更改为:~/..bash_profile#i将其追加为我的最后一行,这似乎是有效的[ -s $(brew -前缀)/etc/autojump.bash] &&。$(brew -前缀)/etc/autojump.bash发布于 2022-02-16 12:40:25
这帮了我https://github.com/wting/autojump/issues/511#issuecomment-362142038
你必须先cd <dirname>
,然后自动跳转,下次你打电话给j <dirname>
时,你会记得的。
发布于 2017-05-23 18:35:31
这个bug似乎存在于最新版本的自动跳转(22.5.1)中。自动跳转命令只打印目录路径,但不更改目录。
我做了以下事情-- 1.)将下面的行添加到我的~/..zshrc文件中
[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
2.)然后简单地创建一个别名,它将自动跳转到cd
命令。
alias j=autojump | cd
希望这对你们有用。
https://stackoverflow.com/questions/30131486
复制相似问题