-bash没有这样的文件或目录,但是它存在 [英] -bash no such file or directory, but it exists
问题描述
我已经用ruby标志重新编译了vim,以实现Command-T令人敬畏,并且我编写了一个脚本,该脚本将在我ssh进入(并运行该脚本)的任何机器上自动为我执行此操作,但是我遇到了一个问题遇到的问题是,当我为新编译的vim加上别名时,bash向我抛出一个没有这样的文件或目录。这是我的财产:
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:
这很好:
$ alias v="~/Code/vim"
但是当我在.bashrc中放入同一行时,我得到:
But when I put this same line in my .bashrc, I get:
-bash: =~/Code/vim: No such file or directory
即使是有趣的事情,我也将它放在我的.bashrc中:
Even funnier, I put this in my .bashrc:
[ -e "~/Code/vim" ] && echo "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
我在做什么错?我正在运行Mac OS X 10.7
What am I doing wrong? I'm running mac os x 10.7
推荐答案
-bash: =~/Code/vim: No such file or directory
您似乎忘记了删除 =
符号
It looks like you forgot remove the =
sign
这篇关于-bash没有这样的文件或目录,但是它存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!