0
点赞
收藏
分享

微信扫一扫

zsh安装以及ROS适配


0. 简介

作为一个算法开发人员,拥有一套良好的开发工具是非常有必要的,其中打交道最多的就是终端命令行。而zsh就是这样一个工具,通过zsh我们可以快速的定制我们喜欢的模型~

1. zsh步骤

1.1 安装 zsh

mac 安装: brew install zsh
Ubuntu 安装: sudo apt-get install zsh
CentOS 安装: yum install zsh

1.2 下载 oh-my-zsh

git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
# 国内
git clone https://gitee.com/who7708/oh-my-zsh.git ~/.oh-my-zsh

1.3 创建 .zshrc 配置文件

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

1.4 更改默认 Shell

查询位置并设置:

which zsh
chsh -s /bin/zsh

1.5 下载相关插件

在 .zshrc 配置文件中找到plugins,加入插件及其他配置。插件直接下载后放置目录: ​​~/.oh-my-zsh/custom/plugins​

cd ~/.oh-my-zsh/custom/plugins

github地址:
git clone https://github.com/zsh-users/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions
git clone https://github.com/zsh-users/zsh-history-substring-search

#国内
git clone https://gitee.com/who7708/zsh-syntax-highlighting
git clone https://gitee.com/who7708/zsh-autosuggestions
git clone https://gitee.com/who7708/zsh-completions
git clone https://gitee.com/who7708/zsh-history-substring-search

修改zshrc文件,完成自动补全功能的添加,这些功能基本上都放在​​ ~/.oh-my-zsh/custom/plugins​​当中

vim ~/.zshrc

# 添加或修改如下:

plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completions
zsh-history-substring-search
)

# ......

alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias tailf='tail -20f'

此时zsh就可以去使用了,下面我连聊一聊我最喜欢的​​powerlevel10k​​组件,这更加定制化,、作者非常喜欢

2. 安装powerlevel10k

2.1 下载powerlevel10k

你可能会觉得现在的主题已经超棒了,但是记得吗,我说过Zsh支持很多个性化配置和插件。下面我们就来讲​​powerlevel10k​​的安装,非常简单就三步

git clone https://github.com/romkatv/powerlevel10k.git
cd powerlevel10k
mv * ~/.oh-my-zsh/themes

2.2 配置powerlevel10k

现在,编辑 ​​~/.zshrc​​​ 文件(比如用 Vim 或者 VSCode),我们来尝试一下​​powerlevel10k​​主题:

zsh安装以及ROS适配_服务器

…详情请参照​​古月居​​


举报

相关推荐

0 条评论