-
Notifications
You must be signed in to change notification settings - Fork 2
/
zsh.txt
executable file
·81 lines (65 loc) · 1.79 KB
/
zsh.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
================
ZSH Notes
================
:Author: `Richard Harding`_
:Contact: mitechie (twitter/identica)
:Repository: `http://github.com/mitechie/zshrc`__
:Bookmarks: http://www.delicious.com/deuce868/zsh
.. __ : http://github.com/mitechie/zshrc
Prompt
======
::
[master//zsh_samples N ]% (rharding@rharding:~/src/zsh_samples/)
- Prompt has two parts - left/right
- When the terminal line runs long, right side disappears.
- Using vcs_info you can add in custom prompt details for all major VCS (svn/git/hg/bzr)
Vim Mode
========
- ``esc`` : enter command mode
- I use mapped to ``jj``
- w/b : forward/back word in editing prompt
- cw/dw : change current word/delete word
- ``f /`` : move cursor forward to first instance of forward slash
- !!:s/XX/YY : Run last command, but replace XX with YY
- / and ? : searching the command history
- n/N : next/prev result
- ``v`` : edit current command line in vim
Working with directories
========================
No cd required
- /var/www/
auto pushd
- cd ... ... ... ..
- dv
- ~0 / ~1
ignore tab complete
- /home/rharding/des<tab>
super globbing
- workit uplift-framework
- ls -al Ula**/* G php L
Directory alias
- alog="/var/log/apache2/"
- more than just a cd alias
- cd
- ls alog
Pipe Alias
- alias -g G='|grep'
- ls | grep zsh
- ls G zsh
- G / L / H / T
Tab Completion is better
- workit workit
- git <tab><tab>
- show detailed help info
- git show <tab>
- grouped options
- ssh <tab>
- all functions have _xxx check out _git<tab>
Shared History
- ls /home
- switch tab
- (hit enter)
- up-arrow
Urls:
- bookmarks http://www.delicious.com/deuce868/zsh
- github sample configs http://github.com/mitechie/zshrc