1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-30 06:03:40 +08:00
ohmyzsh/plugins/singlechar/singlechar.plugin.zsh

56 lines
1.1 KiB
Bash
Raw Normal View History

2012-05-05 16:58:55 +08: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-05 06:05:50 +08:00
###########################
# Settings
2012-05-05 16:58:55 +08:00
2012-05-05 06:05:50 +08: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
###########################
# Alias
# CAT, GREP
2012-05-05 06:05:50 +08:00
alias y='"$GREP" -i'
alias n='"$GREP" -vi'
alias c='cat'
alias w='cat >'
alias a='cat >>'
# XARGS
2012-05-05 06:05:50 +08:00
alias x='xargs'
2012-05-05 06:05:50 +08:00
alias xy='xargs "$GREP" -i'
alias xn='xargs "$GREP" -iv'
alias xc='xargs cat'
alias xw='xargs cat >'
alias xa='xargs cat >>'
# SUDO
2012-05-05 06:05:50 +08:00
alias s='"$ROOT"'
2012-05-05 06:05:50 +08:00
alias sx='"$ROOT" xargs'
2012-05-05 06:05:50 +08:00
alias sxy='"$ROOT" xargs "$GREP" -i'
alias sxn='"$ROOT" xargs "$GREP" -iv'
alias sxc='"$ROOT" xargs cat'
alias sxw='"$ROOT" xargs cat >'
alias sxa='"$ROOT" xargs cat >>'