Zsh:修订间差异

来自MediaWiki
跳转到导航 跳转到搜索
Admin留言 | 贡献
无编辑摘要
Admin留言 | 贡献
无编辑摘要
 
第15行: 第15行:


==4.修改配置文件==
==4.修改配置文件==
'''vi ~/.zshrc'''
<syntaxhighlight lang="shell">
sed -i 's/^plugins=.*/plugins=(git zsh-syntax-highlighting zsh-autosuggestions)/' ~/.zshrc


'''plugins=(git zsh-syntax-highlighting zsh-autosuggestions )'''
source ~/.zshrc
 
</syntaxhighlight>
'''source ~/.zshrc'''


==Git Bash 安装 zsh 和 on-my-zsh==
==Git Bash 安装 zsh 和 on-my-zsh==

2025年9月26日 (五) 09:07的最新版本

1.安装zsh[编辑 | 编辑源代码]

apt install zsh

2.安装oh my zsh[编辑 | 编辑源代码]

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

3.安装插件[编辑 | 编辑源代码]

# 终端提示
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
# 语法高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

4.修改配置文件[编辑 | 编辑源代码]

sed -i 's/^plugins=.*/plugins=(git zsh-syntax-highlighting zsh-autosuggestions)/' ~/.zshrc

source ~/.zshrc

Git Bash 安装 zsh 和 on-my-zsh[编辑 | 编辑源代码]

https://www.jianshu.com/p/01b90a05580f

https://dominikrys.com/posts/zsh-in-git-bash-on-windows/