-bash no such file or directory, but it exists

℡╲_俬逩灬. 提交于 2019-12-11 07:39:42

问题


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


回答1:


-bash: =~/Code/vim: No such file or directory

It looks like you forgot remove the = sign



来源:https://stackoverflow.com/questions/7459037/bash-no-such-file-or-directory-but-it-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!