oh-my-zsh配置

oh-my-zsh是作什么的

开源的zsh配置工具,它的主题和插件系统能够为zsh扩展外观和不少有用的功能,官方是这样介绍的:git

Oh-My-Zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes, and a few things that make you shout...github

Ubuntu默认的终端样式,用了好久,其实也不差shell

默认bash

可是用上oh-my-zsh后,更加美观且实用vim

使用oh-my-zsh

安装zsh

1.安装zsh:sudo apt install zshbash

2.确认安装:zsh --versioncurl

3.设置为默认shell:sudo chsh www -s $(which zsh)工具

4.注销从新登录字体

安装和配置oh-my-zsh

默认的zsh很简陋,就不截图了url

1.安装:sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"插件

2.设置主题为agnoster: vim ~/.zshrc

ZSH_THEME="agnoster"

3.默认用户下隐藏user@hostname: vim ~/.zshrc

export DEFAULT_USER="www"

安装字体支持

此时终端是这样的,由于字体不支持,显示很奇怪

缺乏字体

angoster这个主题须要Powerline-patched font这个字体才能正常

1.安装

# clone

git clone https://github.com/powerline/fonts.git

# install

cd fonts

./install.sh

# clean-up a bit

cd ..

rm -rf fonts

2.设置终端字体

打开Edit->Profiles->Default->Edit->Font, 选择Ubuntu Mono derivative Powerline

至此完成了最简单的配置,感觉飞起的命令行吧!

参考:

oh-my-zsh

Themes

agnoster.zsh-theme

Powerline fonts

Ubuntu 下安装oh-my-zsh

相关文章
相关标签/搜索