那些我希望在一开始使用 Zsh(oh-my-zsh) 时就知道的

2015-04-08 19:48:26 +08:00
 ChiangDi

好吧我承认用了个烂俗的标题。。。

写了一篇关于 zsh 和 oh-my-zsh 的一篇文章:http://www.jiang-di.org/tools/2015/04/08/i-hope-know-when-first-use-zsh.html

上面介绍了一些非常有用的 zsh 插件比如 zzsh-autosuggestions,以及一些神奇的 oh-my-zsh 自带的命令。比如观看历史记录的d 以及可以看到你的使用频率前 10 的命令的 zsh_stats

大家还有什么推荐的我可以加上去喔!

另外用 oh-my-zsh 的同学可以在 Terminal 里敲zsh_stats回车,晒晒你使用命令的 top 10 !

24453 次点击
所在节点    Z shell
105 条回复
jason52
2015-04-09 11:42:22 +08:00
@ChiangDi 没更新到不是问题,只要可以用就行了。关键是它真的可用,就是在cygwin上卡死了~~
但在服务器上面还好是蛮好用的,我看了一下他的源代码,shell脚本这是丑陋啊,这样能work,感觉就像随便组装的拖拉机,不得不去F1赛场上开一样~~

有时间我录个screencast,安利一下以下工具。fasd,readline library, ranger , midnight comander, percol.....

======
主要还是这个人这么说的


percol是mooz开发的天才作品,假设说我精通各种商业开发工具后的开发效率是1的话,那么精通命令行的开发效率是10,但是有了percol后我的效率是100. 举个例子,我曾经认为Linux的唯一缺陷是没有一个total commander之类的文件管理器方便我查找文件. 有了percol后我根本不care了.

fasd, clvv/fasd · GitHub ,好像是个华裔写得,虽然最近不更新了,但是是我每日比用的工具,快速进入你以前进过的目录,打任意关键字匹配.

=====
zongwan
2015-04-09 11:53:44 +08:00
1 1612 16.1216% git
2 1122 11.2211% ll
3 959 9.59096% make
4 881 8.81088% gs
5 677 6.77068% cd
6 558 5.58056% st
7 354 3.54035% brew
8 326 3.26033% rm
9 217 2.17022% cp
10 181 1.81018% svn
11 164 1.64016% docker
12 158 1.58016% scp
13 146 1.46015% ssh
14 134 1.34013% ag
15 116 1.16012% nginx
16 116 1.16012% cat
17 95 0.950095% patch
18 94 0.940094% j
19 85 0.850085% tar
20 84 0.840084% mv
ChiangDi
2015-04-09 11:57:17 +08:00
@jason52 感谢推荐。
ZhaoMiing
2015-04-09 12:41:16 +08:00
1 3923 39.2339% git
2 1298 12.9813% cd
3 461 4.61046% ls
4 433 4.33043% sudo
5 409 4.09041% svn
6 259 2.59026% jekyll
7 182 1.82018% grunt
8 178 1.78018% node
9 168 1.68017% px
10 168 1.68017% npm
11 144 1.44014% spm
12 113 1.13011% gulp
13 100 1.0001% vi
14 85 0.850085% ssh
15 84 0.840084% vm
16 83 0.830083% ping
17 79 0.790079% cat
18 76 0.760076% rm
19 73 0.730073% subl
20 67 0.670067% curl
g0thic
2015-04-09 12:53:21 +08:00
1 201 15.3085% cd
2 143 10.8911% git
3 118 8.98705% sudo
4 66 5.02666% rails
5 59 4.49353% bundle
6 57 4.3412% npm
7 45 3.42727% touch
8 43 3.27494% ls
9 39 2.9703% which
10 35 2.66565% ps
11 33 2.51333% node
12 30 2.28484% top
13 28 2.13252% nvm
14 28 2.13252% brew
15 26 1.9802% svn
16 26 1.9802% cd..
17 25 1.90404% subl
18 24 1.82788% mkdir
19 17 1.29474% nginx
20 16 1.21858% ll
chenggiant
2015-04-09 12:54:11 +08:00
BB9z
2015-04-09 12:59:52 +08:00
非主流了,各种命令很平均么

1 351 9.45073% cd
2 177 4.76575% ls
3 152 4.09262% pod
4 131 3.52719% ssh
5 116 3.12332% brew
6 114 3.06947% git
7 110 2.96177% ping
8 104 2.80022% sudo
9 101 2.71944% ruby
10 93 2.50404% j
11 89 2.39634% asepsisctl
12 87 2.34249% export
13 82 2.20786% gem
14 79 2.12709% aya
15 77 2.07324% jekyll
16 70 1.88476% polipo
17 49 1.31933% echo
18 46 1.23856% curl
19 40 1.07701% cat
20 39 1.05008% sass
Rabbit52
2015-04-09 13:01:34 +08:00
1 3361 33.6134% git
2 1695 16.9517% ls
3 1153 11.5312% cd
4 765 7.65077% docker
5 265 2.65027% ssh
6 195 1.9502% j
7 151 1.51015% vi
8 150 1.50015% go
9 134 1.34013% boot2docker
10 118 1.18012% subl
chevalier
2015-04-09 13:10:41 +08:00
1 2751 27.8329% git
2 1167 11.807% cd
3 1054 10.6637% ls
4 913 9.23715% python
5 717 7.25415% ssh
6 389 3.93565% sudo
7 326 3.29826% vim
8 225 2.27641% exit
9 197 1.99312% clear
10 159 1.60866% grep
11 127 1.2849% ps
12 122 1.23432% supervisorctl
13 120 1.21408% ipython
14 114 1.15338% rm
15 96 0.971267% brew
16 85 0.859976% mysql
17 82 0.829624% cat
18 74 0.748685% scp
19 56 0.566572% lsof
20 39 0.394577% ping
lyris
2015-04-09 13:10:54 +08:00
zsh启动太慢不能忍,用一段时间后卸载了
discrete
2015-04-09 13:18:55 +08:00
➜ ~ zsh_stats
1 148 13.1556% cd
2 132 11.7333% ssh
3 123 10.9333% sudo
4 110 9.77778% ping
5 96 8.53333% ls
6 44 3.91111% dig
7 31 2.75556% find
8 29 2.57778% nslookup
9 29 2.57778% l
10 26 2.31111% rm
11 25 2.22222% pod
12 22 1.95556% whois
13 16 1.42222% brew
14 15 1.33333% mount
15 14 1.24444% killall
16 14 1.24444% aria2c
17 12 1.06667% sed
18 12 1.06667% md5
19 10 0.888889% wget
20 9 0.8% youtube-dl
vCleaner
2015-04-09 13:21:16 +08:00
不建议楼下各位继续贴命令 Top10,本来很有意义的文章最后会因为刷屏进 /go/survey 的。
hxtheone
2015-04-09 14:05:15 +08:00
@ChiangDi 以前也用过一段时间fish,速度比zsh是要快一点,不过不完全兼容bash语法真是硬伤啊

我还记得当时看了oh-my-fish的代码,兼容rvm的方式居然是用bash -c去执行rvm指令,导致我每次在ruby项目里切换目录就会严重卡顿,真是醉了

然后就义无反顾的入了zsh大坑
ChiangDi
2015-04-09 14:35:12 +08:00
@hxtheone 对啊所以我不用 fish 了。
zxc337
2015-04-09 14:55:04 +08:00
 /Users/zxc ❤ zsh_stats
1 2108 22.1825% svn
2 1676 17.6365% ls
3 1559 16.4053% cd
4 357 3.75671% cdw
5 319 3.35683% w
6 313 3.2937% ssh
7 293 3.08324% curl
8 289 3.04114% rm
9 278 2.92539% find
10 274 2.8833% sudo
11 264 2.77807% vi
12 175 1.84152% mvne
13 144 1.51531% scp
14 138 1.45217% hexo
15 106 1.11544% cat
16 99 1.04178% cp
17 81 0.852362% mv
18 75 0.789224% ps
19 73 0.768178% brew
20 72 0.757655% du
kikyous
2015-04-09 15:00:27 +08:00
☁ ~ zsh_stats
1 718 12.7554% rails
2 715 12.7021% bundle
3 594 10.5525% cd
4 446 7.92325% ssh
5 427 7.58572% ls
6 332 5.89803% git
7 308 5.47166% mina
8 231 4.10375% mvim
9 204 3.62409% rake
10 151 2.68254% vim
11 129 2.2917% atom
12 109 1.9364% grep
13 88 1.56333% ps
14 73 1.29686% brew
15 61 1.08367% cap
16 59 1.04814% ifconfig
17 55 0.977083% ping
18 50 0.888257% rm
19 47 0.834962% sudo
20 40 0.710606% ruby
leoYu
2015-04-09 15:31:40 +08:00
⚒ /home/zxc ❤ fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n50
1 213 14.078% ls
2 197 13.0205% cd
3 166 10.9716% svn
4 92 6.08063% sudo
5 80 5.28751% vi
6 80 5.28751% python
7 65 4.2961% cdw
8 59 3.89954% find
9 58 3.83344% ps
10 42 2.77594% w
11 41 2.70985% ssh
12 39 2.57766% rm
13 26 1.71844% mysql
14 18 1.18969% mvne
15 18 1.18969% cat
16 17 1.1236% tail
17 17 1.1236% kill
18 16 1.0575% less
19 15 0.991408% pip
20 13 0.85922% free
21 13 0.85922% fc
22 11 0.727032% du
23 10 0.660939% ping
24 8 0.528751% mkdir
25 8 0.528751% >
26 7 0.462657% which
27 7 0.462657% wget
28 7 0.462657% mv
29 6 0.396563% service
30 6 0.396563% scp
31 6 0.396563% netstat
32 6 0.396563% echo
33 6 0.396563% cp
34 6 0.396563% bash
35 5 0.330469% su
36 5 0.330469% mvnc
37 5 0.330469% curl
38 4 0.264375% pwd
39 4 0.264375% ifconfig
40 4 0.264375% crontab
41 3 0.198282% touch
42 3 0.198282% top
43 3 0.198282% tar
44 3 0.198282% grep
45 3 0.198282% df
46 3 0.198282% chown
47 2 0.132188% yum
48 2 0.132188% webbench
49 2 0.132188% vim
50 2 0.132188% traceroute
panlilu
2015-04-09 15:44:41 +08:00
1 2401 24.0124% cd
2 1614 16.1416% ls
3 1096 10.9611% ssh
4 382 3.82038% scp
5 279 2.79028% ping
6 271 2.71027% rails
7 189 1.89019% grunt
8 146 1.46015% vim
9 144 1.44014% npm
10 140 1.40014% python
11 137 1.37014% sudo
12 128 1.28013% rake
13 118 1.18012% mina
14 114 1.14011% bundle
15 92 0.920092% git
16 80 0.80008% telnet
17 73 0.730073% foreman
18 73 0.730073% brew
19 65 0.650065% gem
20 64 0.640064% ll
ChiangDi
2015-04-09 15:49:26 +08:00
@leoYu
@panlilu
@kikyous
各位!没看到 append 的内容吗??!不要再贴了!!
Heavytiger
2015-04-09 15:52:09 +08:00
1 2581 63.4932% git
2 515 12.6691% cd
3 206 5.06765% exit
4 196 4.82165% ls
5 144 3.54244% pod
6 52 1.27921% sudo
7 31 0.762608% rm
8 30 0.738007% vim
9 24 0.590406% npm
10 19 0.467405% java
11 18 0.442804% nodemon
12 17 0.418204% ssh
13 15 0.369004% open
14 15 0.369004% node
15 13 0.319803% rhc
16 12 0.295203% curl
17 11 0.270603% mvn
18 10 0.246002% man
19 8 0.196802% pwd
20 7 0.172202% source

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/182390

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX