-
Notifications
You must be signed in to change notification settings - Fork 2
/
conf.shell.zshrc
452 lines (395 loc) · 29.7 KB
/
conf.shell.zshrc
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
################################################################################
# This is configuration for zsh on Mac OS. #
# #
# Two ways to use this configuration: #
# #
# 1) Check original configure file ~/.zshrc: #
# cat ~/.zshrc #
# Replace it if no useful configuration in original one: #
# cp ~/scripts/conf.shell.zshrc ~/.zshrc #
# #
# 2) Copy this configuration to home directory: #
# cp ~/scripts/conf.shell.zshrc ~/.zshrc.user #
# Source it in original configure file if not yet: #
# cat ~/.zshrc | grep -n source #
# echo "source ~/.zshrc.user" >> ~/.zshrc #
# #
################################################################################
################################################################################
# Common Configure
################################################################################
# ls
alias ll='ls --color -D "%Y-%m-%d %H:%M:%S" -lh'
alias lla='ls --color -D "%Y-%m-%d %H:%M:%S" -lha'
alias llt='ls --color -D "%Y-%m-%d %H:%M:%S" -lh -rt'
alias llat='ls --color -D "%Y-%m-%d %H:%M:%S" -lha -rt'
# rm
alias rmf='rm -f'
alias rmr='rm -r'
alias rmrf='rm -rf'
# cp
alias cpf='cp -f'
alias cprf='cp -rf'
# Time
alias t='date "+%Y-%m-%d %H:%M:%S"'
# Disk usage
alias dusum='du -sh'
# Reader: less
alias l='less -N'
# Editor: vim
alias v='vim'
# Editor: code from VSCode
alias c='code'
# Editor: sublime text, atom on Max OS
alias e='~/sublime_text/sublime_text'
# Search in all files
# Usage: sa <keyword>
# sai <keyword>
# sae "<regexp>"
# saie "<regexp>"
alias sa='find . -noignore_readdir_race -type f | xargs grep -n -s --color=auto --binary-files=without-match '
alias sai='find . -noignore_readdir_race -type f | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias sae='find . -noignore_readdir_race -type f | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias saie='find . -noignore_readdir_race -type f | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in all files
# Usage: sa0 <keyword>
# sai0 <keyword>
# sae0 "<regexp>"
# saie0 "<regexp>"
alias sa0='find . -noignore_readdir_race -type f -print0 | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias sai0='find . -noignore_readdir_race -type f -print0 | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias sae0='find . -noignore_readdir_race -type f -print0 | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias saie0='find . -noignore_readdir_race -type f -print0 | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in all files within E///
# Usage: se <keyword>
# sei <keyword>
# see "<regexp>"
# seie "<regexp>"
alias se='find . -noignore_readdir_race -type f -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs grep -n -s --color=auto --binary-files=without-match '
alias sei='find . -noignore_readdir_race -type f -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias see='find . -noignore_readdir_race -type f -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias seie='find . -noignore_readdir_race -type f -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in all files within E///
# Usage: se0 <keyword>
# sei0 <keyword>
# see0 "<regexp>"
# seie0 "<regexp>"
alias se0='find . -noignore_readdir_race -type f -print0 -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias sei0='find . -noignore_readdir_race -type f -print0 -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias see0='find . -noignore_readdir_race -type f -print0 -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias seie0='find . -noignore_readdir_race -type f -print0 -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in C/C++ headers and source files
# Usage: ss <keyword>
# ssi <keyword>
# sse "<regexp>"
# ssie "<regexp>"
alias ss='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match '
alias ssi='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias sse='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias ssie='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in C/C++ headers and source files
# Usage: ss0 <keyword>
# ssi0 <keyword>
# sse0 "<regexp>"
# ssie0 "<regexp>"
alias ss0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias ssi0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias sse0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias ssie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" -or -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in C/C++ headers only: *.h, *.hpp, *.hxx
# Usage: sh <keyword>
# shi <keyword>
# she "<regexp>"
# shie "<regexp>"
alias sh='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs grep -n -s --color=auto --binary-files=without-match '
alias shi='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias she='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias shie='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in C/C++ headers only: *.h, *.hpp, *.hxx
# Usage: sh0 <keyword>
# shi0 <keyword>
# she0 "<regexp>"
# shie0 "<regexp>"
alias sh0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias shi0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias she0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias shie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.h" -or -iname "*.hpp" -or -iname "*.hxx" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in C/C++ source files only: *.c, *.cc, *.cxx, *.cpp, *.c++
# Usage: sc <keyword>
# sci <keyword>
# sce "<regexp>"
# scie "<regexp>"
alias sc='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match '
alias sci='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias sce='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias scie='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in C/C++ source files only: *.c, *.cc, *.cxx, *.cpp, *.c++
# Usage: sc0 <keyword>
# sci0 <keyword>
# sce0 "<regexp>"
# scie0 "<regexp>"
alias sc0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias sci0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias sce0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias scie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) \( -iname "*.c" -or -iname "*.cc" -or -iname "*.cxx" -or -iname "*.cpp" -or -iname "*.c++" \) | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in java source files only: *.java
# Usage: sj <keyword>
# sji <keyword>
# sje "<regexp>"
# sjie "<regexp>"
alias sj='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs grep -n -s --color=auto --binary-files=without-match '
alias sji='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias sje='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias sjie='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in java source files only: *.java
# Usage: sj0 <keyword>
# sji0 <keyword>
# sje0 "<regexp>"
# sjie0 "<regexp>"
alias sj0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias sji0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias sje0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias sjie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.java" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in XML files only: *.xml
# Usage: sx <keyword>
# sxi <keyword>
# sxe "<regexp>"
# sxie "<regexp>"
alias sx='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs grep -n -s --color=auto --binary-files=without-match '
alias sxi='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias sxe='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias sxie='find . -noignore_readdir_race -type f \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in XML files only: *.xml
# Usage: sx0 <keyword>
# sxi0 <keyword>
# sxe0 "<regexp>"
# sxie0 "<regexp>"
alias sx0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias sxi0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias sxe0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias sxie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" \) -iname "*.xml" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in database: *.txt
# Usage: sdb <keyword>
# sdbi <keyword>
# sdbe "<regexp>"
# sdbie "<regexp>"
alias sdb='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs grep -n -s --color=auto --binary-files=without-match '
alias sdbi='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias sdbe='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias sdbie='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in database: *.txt
# Usage: sdb0 <keyword>
# sdbi0 <keyword>
# sdbe0 "<regexp>"
# sdbie0 "<regexp>"
alias sdb0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias sdbi0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias sdbe0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias sdbie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.txt" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in signal files: *.sig
# Usage: ssig <keyword>
# ssigi <keyword>
# ssige "<regexp>"
# ssigie "<regexp>"
alias ssig='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs grep -n -s --color=auto --binary-files=without-match '
alias ssigi='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs grep -n -s --color=auto --binary-files=without-match -i '
alias ssige='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs grep -n -s --color=auto --binary-files=without-match -E '
alias ssigie='find . -noignore_readdir_race -type f \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs grep -n -s --color=auto --binary-files=without-match -i -E '
# Search in signal files: *.sig
# Usage: ssig0 <keyword>
# ssigi0 <keyword>
# ssige0 "<regexp>"
# ssigie0 "<regexp>"
alias ssig0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs -0 grep -n -s --color=auto --binary-files=without-match '
alias ssigi0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i '
alias ssige0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs -0 grep -n -s --color=auto --binary-files=without-match -E '
alias ssigie0='find . -noignore_readdir_race -type f -print0 \( -not -path "*/test/*" -a -not -path "*/unitTest/*" -a -not -path "*/blockTest/*" -a -not -path "*/doc/*" -a -not -path "*/sw/bin/*" \) -iname "*.sig" | xargs -0 grep -n -s --color=auto --binary-files=without-match -i -E '
# Find Duplicate Files in Current Folder
# Refer to https://blog.csdn.net/zixiaomuwu/article/details/50878383
#alias fdf='find -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I\{\} -n1 find -type f -size \{\}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate | cut -b 36- '
# Find specific file within current path
alias ff='find . -noignore_readdir_race -type f -iname'
alias sff='~/scripts/find_files.py -t f -s'
# Find specific directory within current path
alias fd='find . -noignore_readdir_race -type d -iname'
alias sfd='~/scripts/find_files.py -t d -s'
################################################################################
# Git Configure
################################################################################
# Git alias
# No need to source it in shell configuration file.
# Source it directly when conf.git-config changed.
# source ~/scripts/conf.git-config
alias g='git'
alias gv='git --version'
alias gh='git h'
alias gconf='git conf'
alias gbr='git br'
alias gbrr='git brr'
alias gbra='git bra'
alias gbrm='git brm'
alias gbrd='git brd'
alias gsw='git sw'
alias gswc='git swc'
alias gswm='git swm'
alias gswd='git swd'
alias gres='git res'
alias gco='git co'
alias gcob='git cob'
alias gcom='git com'
alias ga='git add'
alias gaa='git add --all'
alias gci='git ci'
alias gcia='git cia'
alias grst='git rst'
alias grsth='git rsth'
alias grsth1='git rsth1'
alias grsth2='git rsth2'
alias grsth3='git rsth3'
alias grsth4='git rsth4'
alias grsth5='git rsth5'
alias gcp='git cp'
alias gcpa='git cpa'
alias gcpc='git cpc'
alias grb='git rb'
alias grbm='git rbm'
alias grbi='git rbi'
alias grba='git rba'
alias grbc='git rbc'
alias grvt='git rvt'
alias gblm='git blm'
alias gst='git st'
alias gmt='git mt'
alias gdesc='git desc'
alias grlog='git rlog'
alias glhg='git lhg'
alias glhg10='git lhg10'
alias glhg20='git lhg20'
alias glhg30='git lhg30'
alias glh='git lh'
alias glh10='git lh10'
alias glh20='git lh20'
alias glh30='git lh30'
alias glhd='git lhd'
alias glhd10='git lhd10'
alias glhd20='git lhd20'
alias glhd30='git lhd30'
alias glc='git lc'
alias glch='git lch'
alias glch1='git lch1'
alias glch2='git lch2'
alias glcp='git lcp'
alias glf='git lf'
alias gsls='git sls'
alias gslse='git slse'
alias gslsec='git slsec'
alias gcf='git cf'
alias gsar='git sar'
alias gd='git d'
alias gdh='git dh'
alias gdh1='git dh1'
alias gdh2='git dh2'
alias gdt='git dt'
alias gdth='git dth'
alias gdth1='git dth1'
alias gdth2='git dth2'
alias gsdt='git sdt'
alias gsdtc='git sdtc'
alias gdtc='git dtc'
alias gdtcs='git dtcs'
alias gdtcsf='git dtcsf'
alias glts='git lts'
alias glt='git lt'
alias gllt='git llt'
alias glbt='git lbt'
alias glmb='git lmb'
alias ggl='git gl'
alias gg='git g'
alias ggi='git gi'
alias gcnt='git cnt'
alias gcln='git cln'
alias gopr='git opr'
alias glr='git lr'
alias grem='git rem'
alias gremv='git remv'
alias gf='git f'
alias gfa='git fa'
alias gpl='git pl'
alias gps='git ps'
alias gpsh='git psh'
alias gpsd='git psd'
alias gpsp='git psp'
alias gsub='git sub'
alias gsubst='git subst'
alias gsubstr='git substr'
alias gsubupd1='git subupd1'
alias gsubupdr='git subupdr'
alias gsubrst='git subrst'
alias gsubf='git subf'
alias gsubfa='git subfa'
alias gsubfd='git subfd'
alias gupd='git pull; git subfa; git subupdr'
alias grm='git rm'
alias gmv='git mv'
alias gwt='git wt'
alias gwtl='git wtl'
alias gwta='git wta'
alias gwtrm='git wtrm'
alias gwtp='git wtp'
alias gwtmv='git wtmv'
alias gwtrp='git wtrp'
alias gwtlk='git wtlk'
alias gwtul='git wtul'
# Git completion
# cp ~/scripts/conf.git-completion.bash ~/.git-completion.bash
# cp ~/scripts/conf.git-completion.tcsh ~/.git-completion.tcsh
#source ~/.git-completion.tcsh
#set autolist=ambiguous
# Build git from source code:
# 1) Clean git
# 2) Build git
# 3) Install built git
alias cgit='make distclean'
alias bgit='make prefix=/usr all doc info'
alias igit='sudo make prefix=/usr install install-doc install-html install-info'
################################################################################
# ClearCase Configure
################################################################################
alias vtree='cleartool lsvtree -g'
alias ctco='cleartool co -nc'
alias lsco='cleartool lsco -a -cview -short'
alias cols='cleartool ls -l \`cleartool lsco -a -cview -short\`'
alias ctls='cleartool ls -l'
alias unco='cleartool unco -keep'
alias ctdiff='cleartool diff -g'
alias diffpre='cleartool diff -g -pre'
alias lsall='cleartool lspriv -other'
alias rmall='rm -rf \`cleartool lspriv -other\`'
################################################################################
# Python Configure
################################################################################
# Use command pip3 instead of below alias p3pip
alias p3pip='python3 -m pip'
# Use python3 by default
alias p3='python3'
alias p='python3'
################################################################################
# VirtualBox
################################################################################
# alias llsf='sudols --time-style="+%Y-%m-%d %H:%M:%S" -lha /media/sf_share/'
alias llsf='ls --time-style="+%Y-%m-%d %H:%M:%S" -lha /media/sf_share/'
# alias cpsf='sudo cp -rf /media/sf_share/ /home/chenwx/sf_share/ && sudo chown -R chenwx:chenwx /home/chenwx/share/sf_share/'
alias cpsf='cp -rf /media/sf_share/ /home/chenwx/sf_share/'
################################################################################
# GitHub Blog
################################################################################
alias bblog='jekyll server --incremental 2>/dev/null'
alias bbloginc='jekyll server 2>/dev/null'
################################################################################
# MacBook
################################################################################
# Remove .DS_Store files in current folder on MacOS
alias rmdsstore='find . -name ".DS_Store" -type f -delete'
################################################################################
# Other Configure
################################################################################