bash - Git .bash_profile - 带有 git grep 的函数无法正常工作
问题描述
我的 bash_profile 中有以下(减少的)功能
function gg()
{
search=$1
search=\"$search\"
echo "git grep -i $search"
git grep -i $search
}
我已将 "-quotes 添加到搜索变量中,因为搜索文字可以包含多个单词并且变量不再引用。回显是正确的(例如测试“谁在那儿” ---> git grep -i “谁在那里”),但我没有得到任何结果......
你有什么主意吗?
解决方案
推荐阅读
- angular - 使用 BehaviorSubject Angular 5 在两个组件之间共享对象的麻烦
- javascript - 如何将两个 js 列表映射到一对列表?
- html - Div 在移动预览中与文本重叠
- javascript - Leaflet.Draw - 将文件导出为模态附件
- mysql - mysql 表在 phpMyAdmin 中不可编辑(没有主键?)
- iis - IIS 8.5 上的 PROPFIND 405 错误
- sql - 使用数据透视显示查询结果
- javascript - 当 XSL 包含导入时,Internet Explorer 11 上的 Javascript XSL 转换不起作用
- mysql - 具有 300 万条记录的 Mysql RDS 不允许添加新列
- python - “会话/行号在数据库中不是唯一的”之间的依赖关系。错误和 Python 代码