singlechar.plugin.zsh 1.6 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'

33
34
35
36
alias c='cat'
alias w='cat >'
alias a='cat >>'

mapc's avatar
mapc committed
37
38
alias p='"$PAGER"'

mapc's avatar
mapc committed
39
40
41
alias d='"$WGET"'
alias u='"$CURL"'

42
43
# XARGS

mapc's avatar
mapc committed
44
alias x='xargs'
45

mapc's avatar
mapc committed
46
47
48
alias xy='xargs "$GREP" -i'
alias xn='xargs "$GREP" -iv'

49
50
51
52
alias xc='xargs cat'
alias xw='xargs cat >'
alias xa='xargs cat >>'

mapc's avatar
mapc committed
53
54
alias xp='xargs "$PAGER"'

mapc's avatar
mapc committed
55
56
57
alias xd='xargs "$WGET"'
alias xu='xargs "$CURL"'

58
59
# SUDO

mapc's avatar
mapc committed
60
alias s='"$ROOT"'
61

mapc's avatar
mapc committed
62
63
64
65
66
67
68
69
70
71
72
73
74
alias sy='"$ROOT" "$GREP" -i'
alias sn='"$ROOT" "$GREP" -iv'

alias sc='"$ROOT" cat'
alias sw='"$ROOT" cat >'
alias sa='"$ROOT" cat >>'

alias sp='"$ROOT" "$PAGER"'

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

# SUDO-XARGS

mapc's avatar
mapc committed
75
alias sx='"$ROOT" xargs'
76

mapc's avatar
mapc committed
77
alias sxy='"$ROOT" xargs "$GREP" -i'
78
79
80
81
82
alias sxn='"$ROOT" xargs "$GREP" -iv'

alias sxc='"$ROOT" xargs cat'
alias sxw='"$ROOT" xargs cat >'
alias sxa='"$ROOT" xargs cat >>'
mapc's avatar
mapc committed
83

mapc's avatar
mapc committed
84
85
alias sxp='"$ROOT" xargs "$PAGER"'

mapc's avatar
mapc committed
86
87
alias sxd='"$ROOT" xargs "$WGET"'
alias sxu='"$ROOT" xargs "$CURL"'