2012-05-05 08:58:55 +00:00
|
|
|
################################################################################
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
###########################
|
|
|
|
# Settings
|
2012-05-05 08:58:55 +00:00
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
# 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
|
2012-05-05 14:03:48 +00:00
|
|
|
default WGET wget
|
|
|
|
default CURL curl
|
2012-05-04 22:05:50 +00:00
|
|
|
|
2012-05-05 14:10:52 +00:00
|
|
|
env_default PAGER less
|
2012-05-05 14:07:05 +00:00
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
###########################
|
|
|
|
# Alias
|
|
|
|
|
2012-05-05 14:03:48 +00:00
|
|
|
# CAT, GREP, CURL, WGET
|
2012-05-05 08:52:46 +00:00
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
alias y='"$GREP" -i'
|
|
|
|
alias n='"$GREP" -vi'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias w='echo >'
|
|
|
|
alias a='echo >>'
|
2012-05-05 08:52:46 +00:00
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias c='cat'
|
2012-05-05 14:07:05 +00:00
|
|
|
alias p='"$PAGER"'
|
|
|
|
|
2012-05-05 14:03:48 +00:00
|
|
|
alias d='"$WGET"'
|
|
|
|
alias u='"$CURL"'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
# enhanced writeing
|
|
|
|
|
|
|
|
alias w:='cat >'
|
|
|
|
alias a:='cat >>'
|
|
|
|
|
2012-05-05 08:52:46 +00:00
|
|
|
# XARGS
|
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
alias x='xargs'
|
2012-05-05 08:52:46 +00:00
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
alias xy='xargs "$GREP" -i'
|
|
|
|
alias xn='xargs "$GREP" -iv'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias xw='xargs echo >'
|
|
|
|
alias xa='xargs echo >>'
|
2012-05-05 08:52:46 +00:00
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias xc='xargs cat'
|
2012-05-05 14:07:05 +00:00
|
|
|
alias xp='xargs "$PAGER"'
|
|
|
|
|
2012-05-05 14:03:48 +00:00
|
|
|
alias xd='xargs "$WGET"'
|
|
|
|
alias xu='xargs "$CURL"'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias xw:='xargs cat >'
|
|
|
|
alias xa:='xargs >>'
|
|
|
|
|
2012-05-05 08:52:46 +00:00
|
|
|
# SUDO
|
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
alias s='"$ROOT"'
|
2012-05-05 08:52:46 +00:00
|
|
|
|
2012-05-05 14:08:40 +00:00
|
|
|
alias sy='"$ROOT" "$GREP" -i'
|
|
|
|
alias sn='"$ROOT" "$GREP" -iv'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias sw='"$ROOT" echo >'
|
|
|
|
alias sa='"$ROOT" echo >>'
|
2012-05-05 14:08:40 +00:00
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias sc='"$ROOT" cat'
|
2012-05-05 14:08:40 +00:00
|
|
|
alias sp='"$ROOT" "$PAGER"'
|
|
|
|
|
|
|
|
alias sd='"$ROOT" "$WGET"'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias sw:='"$ROOT" cat >'
|
|
|
|
alias sa:='"$ROOT" cat >>'
|
|
|
|
|
2012-05-05 14:08:40 +00:00
|
|
|
# SUDO-XARGS
|
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
alias sx='"$ROOT" xargs'
|
2012-05-05 08:52:46 +00:00
|
|
|
|
2012-05-04 22:05:50 +00:00
|
|
|
alias sxy='"$ROOT" xargs "$GREP" -i'
|
2012-05-05 08:52:46 +00:00
|
|
|
alias sxn='"$ROOT" xargs "$GREP" -iv'
|
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias sxw='"$ROOT" xargs echo >'
|
|
|
|
alias sxa='"$ROOT" xargs echo >>'
|
2012-05-05 14:03:48 +00:00
|
|
|
|
2012-05-05 14:17:26 +00:00
|
|
|
alias sxc='"$ROOT" xargs cat'
|
2012-05-05 14:07:05 +00:00
|
|
|
alias sxp='"$ROOT" xargs "$PAGER"'
|
|
|
|
|
2012-05-05 14:03:48 +00:00
|
|
|
alias sxd='"$ROOT" xargs "$WGET"'
|
2012-05-05 14:17:26 +00:00
|
|
|
alias sxu='"$ROOT" xargs "$CURL"'
|
|
|
|
|
|
|
|
alias sxw:='"$ROOT" xargs cat >'
|
|
|
|
alias sxa:='"$ROOT" xargs cat >>'
|