我已经搜索并找到了几个答案,但我没有成功改变我的答案。
操作系统:Mac OS X
我的 .bashrc 内容
# Before other PATHs...
PATH=${PATH}:/usr/local/share/python
alias la='ls -la'
function find_cpp_filepath_with_string { find $1 -name "*.cpp" -type f -exec grep -l $2 {} \;}
#export -f find_cpp_filepath_with_string
else
echo "WARNING: Can't find virtualenvwrapper.sh"
fi
麻烦的线如下
function find_cpp_filepath_with_string { find $1 -name "*.cpp" -type f -exec grep -l $2 {} \;}
尝试 source ~/.bashrc 后,结果是:
line 21: syntax error: unexpected end of file