惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - Sameen

上下文工程学习笔记 什么是vibe ? 什么是 embedding ? angular中asObservable是什么的,为什么需要用? vscode问题 document cookie JavaScript中的Date squash merge Element.scrollIntoView requestIdleCallback angular学习笔记 [转]React hooks useEffect中如何使用异步函数(即如何使用async/await) css斜条纹背景——linear-gradient 【转】过滤不可见字符 换电脑快捷同步vscode插件和配置 Mac上看不到.git目录下的隐藏文件的解决方法 ts 问号点 ?. moment获取本月、上个月、近三个月时间段 iframe优缺点
Git自动补全配置安装(Mac版本)
Sameen · 2021-06-07 · via 博客园 - Sameen

首先要安装 bash-completion,看一下自己的bash命令是否可以补全,如果不行要先安装bash-completion

brew install bash-completion
下载git源码
使用如下命令即可下载

git clone https://github.com/git/git
复制 git-completion.bash
源代码下有个 contrib/completion 目录,有个 git-completion.bash 文件

cd git/contrib/completion/
将该文件复制到主目录(~)下。注意:复制时,文件名前加一个"点"(.),命令如下:
cp git-completion.bash ~/.git-completion.bash
修改主目录下的 .bashrc 文件(如果没有该文件,新建一个)。添加一行代码
source ~/.git-completion.bash
 

将下面代码添加到~/.bash_profile(如果没有该文件,新建一个)。

# git auto completition
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
然后,source一下使其生效

source ~/.git-completion.bash
source ~/.bash_profile
这样就可以,按下Tab键就可以提示啦。(如果还不可以,重启终端试试)

$ git che
checkout cherry cherry-pick

切换mac shell:

https://support.apple.com/zh-cn/HT208050