singlechar.plugin.zsh 1.29 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
23
24
25

###########################
# Alias

mapc's avatar
mapc committed
26
# CAT, GREP, CURL, WGET
27

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

31
32
33
34
alias c='cat'
alias w='cat >'
alias a='cat >>'

mapc's avatar
mapc committed
35
36
37
alias d='"$WGET"'
alias u='"$CURL"'

38
39
# XARGS

mapc's avatar
mapc committed
40
alias x='xargs'
41

mapc's avatar
mapc committed
42
43
44
alias xy='xargs "$GREP" -i'
alias xn='xargs "$GREP" -iv'

45
46
47
48
alias xc='xargs cat'
alias xw='xargs cat >'
alias xa='xargs cat >>'

mapc's avatar
mapc committed
49
50
51
alias xd='xargs "$WGET"'
alias xu='xargs "$CURL"'

52
53
# SUDO

mapc's avatar
mapc committed
54
alias s='"$ROOT"'
55

mapc's avatar
mapc committed
56
alias sx='"$ROOT" xargs'
57

mapc's avatar
mapc committed
58
alias sxy='"$ROOT" xargs "$GREP" -i'
59
60
61
62
63
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
64
65
66

alias sxd='"$ROOT" xargs "$WGET"'
alias sxu='"$ROOT" xargs "$CURL"'