oh-my-zsh,让你的终端从未这么爽过

shell的类型有很多种,linux下默认的是bash,虽然bash的功能已经很强大,但对于以懒惰为美德的程序员来说,bash的提示功能不够强大,界面也不够炫,并非理想工具。

而zsh的功能极其强大,只是配置过于复杂,起初只有极客才在用。后来,有个穷极无聊的程序员可能是实在看不下去广大猿友一直只能使用单调的bash, 于是他创建了一个名为

oh-my-zsh

的开源项目…

https://github.com/robbyrussell/oh-my-zsh

自此,只需要简单的安装配置,小白程序员们都可以用上高档大气上档次,狂拽炫酷吊炸天的

oh my zsh

http://ohmyz.sh/

安装zsh

以centos7为例:

查看系统当前使用的shell

查看系统是否安装了zsh

centos7默认情况下没安装zsh

用yum安装zsh

查看shell列表

切换shell为zsh

重启服务器后,可使用

reboot

重启后,查看当前shell

安装 oh my zsh

oh-my-zsh源码是放在github上,先确保你的机器上已安装了git

安装:

成功界面:

接下来只需简单的配置,就可以享受

oh-my-zsh

的强大

主题选择

oh-my-zsh有很多漂亮的主题:

主题列表

我使用的主题是

ys

http://blog.ysmood.org/my-ys-terminal-theme/

http://blog.ysmood.org/my-ys-terminal-theme/

修改主题:

ZSH_THEME

改成

ys

更新配置:

自动补齐插件

linux不少命令的参数很多,不可能一一记住,常规的查看手册又觉得慢。如果你也有这种苦恼,那么我相信你会爱上

oh-my-zsh

一图胜千言

自动补全的插件

incr.zsh 补全插件

下载此插件:

将此插件放到oh-my-zsh目录的插件库下:

~/.zshrc

文件末尾加上

更新配置:

接下来你就可以体验到

Your terminal never felt this good before

与vim的提示相冲突的解决方案

使用自动补全插件可能会与vim的提示功能相冲突,如会报以下错误:

解决方法:将

~/.zcompdump*

删除即可

欢迎访问我的博客原文

解决卡顿问题

有时候执行

cd

会卡,这让人难以忍受。原因是oh-my-zsh在获取git信息,可以将git信息隐藏:

自动提示填充

这个功能非常的实用,可以提高我们的开发效率

先克隆

zsh-autosuggestions

项目,到指定目录:
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

然后编辑

vim ~/.zshrc

文件,找到

plugins

配置,增加

zsh-autosuggestions

插件。

clipboard.png

https://github.com/zsh-users/zsh-autosuggestions

用法
当您键入命令时,您将看到光标处于柔和灰色后提供的完成。可以通过设置ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE变量来更改此颜色。请参阅配置。

如果您按下→键(forward-char窗口小部件)或End(end-of-line窗口小部件),光标位于缓冲区的末尾,它将接受建议,用建议替换命令行缓冲区的内容。

如果您调用forward-word窗口小部件,它将部分接受建议直到光标移动到的位置。

分类: 未分类

54 条评论

best CBD Oil · 2020年4月17日 下午5:03

Howdy! This post could not be written any better! Going through this post reminds me of my previous roommate! He always kept talking about this. I am going to forward this post to him. Pretty sure he’ll have a good read. Thank you for sharing!|

best cbd oil · 2020年4月22日 下午1:13

nich blog

cbd sex lube · 2020年4月25日 上午5:45

i bookmared your site

cbd oil for pets · 2020年4月26日 下午7:09

Thanks for sharing

anális szex játékok · 2020年4月29日 上午7:36

i bookmared your site

cannabidiol uk · 2020年5月1日 下午7:52

amazing

buy real youtube views and comments · 2020年5月2日 上午1:37

Thanks you

Juul pods bulk · 2020年5月2日 上午11:55

i bookmared your site

sanal ofis · 2020年5月2日 下午12:13

amazing

how to buy the best cbd oil · 2020年5月2日 下午7:42

Thanks for the article

buy youtube adwords views · 2020年5月3日 上午6:15

nich blog

adult porn videos · 2020年5月4日 下午11:25

Thanks for sharing

cbd oil · 2020年5月7日 上午12:22

amazing

best cbd oil · 2020年5月9日 上午11:12

Wow, this post is nice, my younger sister is analyzing these kinds of things, therefore I am going to tell her.|

cbd oil · 2020年5月10日 上午1:42

Just wish to say your article is as surprising. The clearness in your post is just great and i could assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please continue the enjoyable work.|

buy youtube views · 2020年5月10日 下午11:17

Thanks for sharing

sanal ofis · 2020年5月11日 上午4:39

Nice to read will follow again.

web design company · 2020年5月12日 上午9:57

Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?|

dijital pazarlama · 2020年5月13日 上午7:24

Very nice to read and follow again. Hope to read more about this.

legal cannabis alternative uk · 2020年5月13日 上午10:53

Thanks for sharing

cbd oil companies · 2020年5月13日 上午11:14

Hi to all, it’s truly a pleasant for me to go to see this website, it consists of helpful Information.|

canibus oil · 2020年5月13日 下午5:03

I do not even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you’re going to a famous blogger if you are not already 😉 Cheers!|

Fake Agency · 2020年5月13日 下午11:24

It’s the best time to make some plans for the future and it’s time to be happy. I’ve read this put up and if I may just I desire to counsel you some interesting things or tips. Maybe you could write subsequent articles relating to this article. I wish to learn more things about it!|

escort service usa · 2020年5月14日 上午8:01

Excellent pieces. Keep writing such kind of info on your blog. Im really impressed by it.

Scam agency · 2020年5月14日 上午8:57

i bookmared your site

cbd oil for dogs reviews · 2020年5月14日 下午4:13

I don’t even know how I ended up here, but I thought this post was good. I do not know who you are but certainly you are going to a famous blogger if you are not already 😉 Cheers!|

Bester plastischer Chirurg · 2020年5月15日 上午8:06

Hi! I could have sworn I’ve been to this site before but after looking at a few of the articles I realized it’s new to me. Anyways, I’m definitely delighted I found it and I’ll be bookmarking it and checking back regularly!|

cbd oil · 2020年5月15日 上午10:14

i bookmared your site

Riverrreviews · 2020年5月15日 下午9:46

Hi, after reading this awesome post i am too cheerful to share my experience here with friends.|

cbd oil · 2020年5月16日 上午1:36

amazing

Scam · 2020年5月16日 上午2:46

I think that is one of the such a lot vital information for me. And i am happy reading your article. However should remark on few general things, The site taste is wonderful, the articles is really great : D. Good process, cheers|

ragdoll kittens for adoption · 2020年5月16日 下午4:23

Great beat ! I wish to apprentice while you amend your website, how could i subscribe for a blog site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea|

cbd oil · 2020年5月16日 下午9:59

I enjoy what you guys are up too. This sort of clever work and exposure! Keep up the amazing works guys I’ve included you guys to blogroll.|

cbd oil · 2020年5月17日 上午4:33

If you are going for best contents like I do, just pay a quick visit this web page every day for the reason that it gives feature contents, thanks|

cbd oil near me · 2020年5月17日 下午11:11

What i do not realize is in truth how you’re now not really a lot more neatly-appreciated than you might be now. You’re so intelligent. You understand therefore significantly with regards to this matter, made me in my opinion believe it from a lot of numerous angles. Its like men and women don’t seem to be fascinated until it’s one thing to do with Woman gaga! Your individual stuffs excellent. Always deal with it up!|

cbd oil · 2020年5月18日 下午12:17

Attractive element of content. I just stumbled upon your blog and in accession capital to say that I acquire in fact enjoyed account your blog posts. Any way I’ll be subscribing for your augment or even I success you get right of entry to consistently rapidly.|

cbd oil uk · 2020年5月18日 下午8:31

I quite like reading through an article that will make people think. Also, thank you for permitting me to comment!|

THC CARTRIDGES · 2020年5月20日 上午11:28

I’m excited to uncover this great site. I wanted to thank you for ones time due to this fantastic read!! I definitely savored every little bit of it and I have you saved as a favorite to look at new things on your site.|

cbd oil companies · 2020年5月21日 上午3:06

At this moment I am ready to do my breakfast, after having my breakfast coming over again to read further news.|

best cbd oil · 2020年5月22日 下午9:23

I blog quite often and I genuinely thank you for your content. This great article has really peaked my interest. I will take a note of your blog and keep checking for new information about once a week. I subscribed to your RSS feed too.|

cbd oil companies · 2020年5月22日 下午11:42

Hi there mates, how is all, and what you would like to say on the topic of this article, in my view its in fact awesome for me.|

click here · 2020年5月24日 上午12:17

Nice post. I was checking continuously this blog and I am impressed! Extremely useful information particularly the last part 🙂 I care for such info a lot. I was looking for this certain info for a long time. Thank you and best of luck.|

best cbd oil companies · 2020年5月24日 上午7:15

Superb blog! Do you have any helpful hints for aspiring writers? I’m hoping to start my own website soon but I’m a little lost on everything. Would you propose starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m totally confused .. Any tips? Kudos!|

my blog · 2020年5月24日 上午7:49

I’m really enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme? Fantastic work!|

my website · 2020年5月24日 上午10:04

If you are going for finest contents like myself, simply pay a visit this web page all the time since it presents feature contents, thanks|

visit · 2020年5月24日 下午4:19

What i don’t realize is in truth how you are now not actually a lot more smartly-favored than you may be right now. You are so intelligent. You know therefore considerably when it comes to this topic, produced me personally consider it from a lot of varied angles. Its like women and men aren’t fascinated except it’s one thing to do with Girl gaga! Your individual stuffs nice. Always handle it up!|

payday loan · 2020年5月25日 上午5:20

I constantly spent my half an hour to read this weblog’s articles every day along with a mug of coffee.|

Best Fiverr Gigs · 2020年5月26日 上午2:48

I am not sure where you are getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for magnificent information I was looking for this info for my mission.|

fiverr gig · 2020年5月26日 下午4:07

Hello There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll certainly comeback.|

Visit garagedoorrepairdfw.com · 2020年5月27日 上午3:28

Thanks for your marvelous posting! I certainly enjoyed reading it, you are a great author.I will always bookmark your blog and definitely will come back in the foreseeable future. I want to encourage continue your great posts, have a nice morning!|

Social media from Europe · 2020年5月27日 上午10:48

Hello would you mind letting me know which web host you’re using? I’ve loaded your blog in 3 completely different internet browsers and I must say this blog loads a lot faster then most. Can you recommend a good hosting provider at a honest price? Cheers, I appreciate it!|

website · 2020年5月29日 上午2:22

Keep on working, great job!|

send message · 2020年5月29日 下午3:09

Can you tell us more about this? I’d want to find out some additional information.|

signs you are skinny fat · 2020年5月30日 上午1:48

I think this is one of the most important info for me. And i am glad reading your article. But want to remark on some general things, The web site style is wonderful, the articles is really nice : D. Good job, cheers|

发表评论

电子邮件地址不会被公开。 必填项已用*标注