-bash 没有这样的文件或目录,但它存在
我已经使用 ruby 标志重新编译了 vim,以实现 command-T 的出色功能,并且我编写了一个脚本,该脚本将在我 ssh 进入(并运行脚本)的任何机器上自动为我执行此操作,但我遇到的一个问题是当我给新编译的 vim 加上别名时,bash 会向我抛出一个 no such file or directory 。这就是我所拥有的:
这工作正常:
$ alias v="~/Code/vim"
但是当我将同一行放入我的 .bashrc 中时,我得到:
-bash: =~/Code/vim: No such file or directory
更有趣的是,我将其放入我的 .bashrc 中:
[ -e "~/Code/vim" ] && echo "found it!"
然后打印“找到它!”
我不确定这是否是权限问题,但无论如何我只是将它们放在这里:
-rwxr-xr-x 1 buf staff 2374400 Sep 17 16:27 /Users/buf/Code/vim
我做错了什么?我运行的是 mac os x 10.7
I've recompiled vim with the ruby flag for command-T awesomeness, and I wrote a script that will automatically do this for me on any machine I ssh into (and run the script), but an issue that I'm running into is that when I alias the newly compiled vim, bash throws a no such file or directory at me. Here's what I have:
This works fine:
$ alias v="~/Code/vim"
But when I put this same line in my .bashrc, I get:
-bash: =~/Code/vim: No such file or directory
Even funnier, I put this in my .bashrc:
[ -e "~/Code/vim" ] && echo "found it!"
And that prints "found it!"
I'm not sure if it's a permission issue, but I'm just going to put them here anyway:
-rwxr-xr-x 1 buf staff 2374400 Sep 17 16:27 /Users/buf/Code/vim
What am I doing wrong? I'm running mac os x 10.7
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎忘记删除
=
符号It looks like you forgot remove the
=
sign