singlechar.plugin.zsh 2.27 KB
Newer Older
mapc's avatar
mapc committed
1
2
3
4
5
6
7
8
9
10
################################################################################
#          FILE:  singlechar.plugin.zsh
#   DESCRIPTION:  oh-my-zsh plugin file.
#        AUTHOR:  Michael Varner (musikmichael@web.de)
#       VERSION:  1.0.0
#
# This plugin adds single char shortcuts (and combinations) for some commands.
#
################################################################################

mapc's avatar
mapc committed
11
12
###########################
# Settings 
mapc's avatar
mapc committed
13

mapc's avatar
mapc committed
14
15
16
17
18
19
# These can be overwritten any time.
# If they are not set yet, they will be
# overwritten with their default values

default GREP grep
default ROOT sudo
mapc's avatar
mapc committed
20
21
default WGET wget
default CURL curl
mapc's avatar
mapc committed
22

mapc's avatar
mapc committed
23
env_default PAGER less
mapc's avatar
mapc committed
24

mapc's avatar
mapc committed
25
26
27
###########################
# Alias

mapc's avatar
mapc committed
28
# CAT, GREP, CURL, WGET
29

mapc's avatar
mapc committed
30
31
32
alias y='"$GREP" -i'
alias n='"$GREP" -vi'

mapc's avatar
mapc committed
33
34
35
36
37
38
alias f.='find .'
alias f:='find'

alias f='"$GREP" -li'
alias fn='"$GREP" -lvi'

mapc's avatar
mapc committed
39
40
alias w='echo >'
alias a='echo >>'
41

mapc's avatar
mapc committed
42
alias c='cat'
mapc's avatar
mapc committed
43
44
alias p='"$PAGER"'

mapc's avatar
mapc committed
45
46
47
alias d='"$WGET"'
alias u='"$CURL"'

mapc's avatar
mapc committed
48
# enhanced writing
mapc's avatar
mapc committed
49
50
51
52

alias w:='cat >'
alias a:='cat >>'

53
54
# XARGS

mapc's avatar
mapc committed
55
alias x='xargs'
56

mapc's avatar
mapc committed
57
58
59
alias xy='xargs "$GREP" -i'
alias xn='xargs "$GREP" -iv'

mapc's avatar
mapc committed
60
61
62
63
64
65
alias xf.='xargs find .'
alias xf:='xargs find'

alias xf='xargs "$GREP" -li'
alias xfn='xargs "$GREP" -lvi'

mapc's avatar
mapc committed
66
67
alias xw='xargs echo >'
alias xa='xargs echo >>'
68

mapc's avatar
mapc committed
69
alias xc='xargs cat'
mapc's avatar
mapc committed
70
71
alias xp='xargs "$PAGER"'

mapc's avatar
mapc committed
72
73
74
alias xd='xargs "$WGET"'
alias xu='xargs "$CURL"'

mapc's avatar
mapc committed
75
76
77
alias xw:='xargs cat >'
alias xa:='xargs >>'

78
79
# SUDO

mapc's avatar
mapc committed
80
alias s='"$ROOT"'
81

mapc's avatar
mapc committed
82
83
84
alias sy='"$ROOT" "$GREP" -i'
alias sn='"$ROOT" "$GREP" -iv'

mapc's avatar
mapc committed
85
86
87
88
89
90
alias xf.='"$ROOT" find .'
alias xf:='"$ROOT" find'

alias xf='"$ROOT" "$GREP" -li'
alias xfn='"$ROOT" "$GREP" -lvi'

mapc's avatar
mapc committed
91
92
alias sw='"$ROOT" echo >'
alias sa='"$ROOT" echo >>'
mapc's avatar
mapc committed
93

mapc's avatar
mapc committed
94
alias sc='"$ROOT" cat'
mapc's avatar
mapc committed
95
96
97
98
alias sp='"$ROOT" "$PAGER"'

alias sd='"$ROOT" "$WGET"'

mapc's avatar
mapc committed
99
100
101
alias sw:='"$ROOT" cat >'
alias sa:='"$ROOT" cat >>'

mapc's avatar
mapc committed
102
103
# SUDO-XARGS

mapc's avatar
mapc committed
104
alias sx='"$ROOT" xargs'
105

mapc's avatar
mapc committed
106
alias sxy='"$ROOT" xargs "$GREP" -i'
107
108
alias sxn='"$ROOT" xargs "$GREP" -iv'

mapc's avatar
mapc committed
109
110
111
112
113
114
alias sxf.='"$ROOT" xargs find .'
alias sxf:='"$ROOT" xargs find'

alias sxf='"$ROOT" xargs "$GREP" -li'
alias sxfn='"$ROOT" xargs "$GREP" -lvi'

mapc's avatar
mapc committed
115
116
alias sxw='"$ROOT" xargs echo >'
alias sxa='"$ROOT" xargs echo >>'
mapc's avatar
mapc committed
117

mapc's avatar
mapc committed
118
alias sxc='"$ROOT" xargs cat'
mapc's avatar
mapc committed
119
120
alias sxp='"$ROOT" xargs "$PAGER"'

mapc's avatar
mapc committed
121
alias sxd='"$ROOT" xargs "$WGET"'
mapc's avatar
mapc committed
122
123
124
125
alias sxu='"$ROOT" xargs "$CURL"'

alias sxw:='"$ROOT" xargs cat >'
alias sxa:='"$ROOT" xargs cat >>'