新选题

This commit is contained in:
王兴宇 2013-09-21 11:36:59 +08:00
parent 8495a679bd
commit 8053724f6f

View File

@ -0,0 +1,52 @@
Ten Great Zsh Tips
==================
1: Use ** as a wildcard to descend into directories:
$ ls **/*.pyc
foo.pyc bar.pyc lib/wibble.pyc
$ rm **/*.pyc
$ ls **/*.pyc
2: Use patterns in file globs:
$ ls *.(py|sh)
3: Use glob modifiers, e.g. (@) restricts glob to matching symlinks
$ ls -l *(@)
4: Use tab completion everywhere! e.g. using man…
$ man zsh[TAB]
5: …for completing command options…
$ python -[TAB]
6: …for kill
$ kill Dock[TAB]
7: Navigate the tab completion options with your cursor keys
$ man zsh[TAB][DOWN][RIGHT][LEFT][UP]
8: Auto-correct your typos
$ pythn -V
zsh: correct 'pythn' to 'python' [nyae]? y
Python 2.7.1
9: Use r to repeat the last command with substitutions!
$ touch foo.htm bar.htm
$ mv foo.htm foo.html
$ r foo=bar
mv bar.htm bar.html
10: Highly customisable prompt, including RPROMPT to set a prompt on the right hand side
$ RPROMPT="%t"
via: http://blog.goosoftware.co.uk/2012/05/22/ten-great-zsh-tips/