75 lines
2.0 KiB
Plaintext
75 lines
2.0 KiB
Plaintext
###############################################################################
|
|
#
|
|
# ~/.alias
|
|
#
|
|
# Maintainer:
|
|
# TheFlyingFool - tff@theflyingfool.com
|
|
# http://theflyingfool.com
|
|
#
|
|
#
|
|
# Credits:
|
|
# Package Management Section
|
|
# https://gist.github.com/rroblak/8137276
|
|
###############################################################################
|
|
|
|
alias vi="vim" #Insure vim
|
|
tmux_alias() {
|
|
if [[ $# -eq 0 ]]; then
|
|
tmux attach
|
|
else
|
|
tmux "$@"
|
|
fi
|
|
}
|
|
alias tmux=tmux_alias
|
|
#Coloration of core utils
|
|
alias grep="grep -n --color=auto" #grep
|
|
alias egrep='egrep --color=auto'
|
|
alias fgrep='fgrep --color=auto'
|
|
alias ls="ls --color=auto" #ls
|
|
|
|
#VimLess
|
|
alias less="/usr/share/vim/vim91/macros/less.sh"
|
|
|
|
if [ -e "/usr/bin/apt-get" ] ; then # Apt-based distros (Debian, Ubuntu, etc.)
|
|
aptget="/usr/bin/apt-get" # I currently do not use any apt-based distros
|
|
sudoaptget="sudo $aptget"
|
|
aptcache="/usr/bin/apt-cache"
|
|
dpkg="/usr/bin/dpkg"
|
|
alias S="$sudoaptget install"
|
|
alias Syu="$sudoaptget update"
|
|
alias Ss="$aptcache search"
|
|
alias Si="$aptcache show"
|
|
elif [ -e "/usr/bin/yay" ] ; then
|
|
yay="/usr/bin/yay"
|
|
sudoyay="sudo $yay"
|
|
alias S="$yay -S"
|
|
alias Syy="$yay -Syy"
|
|
alias Syu="$yay -Syu"
|
|
alias Rns="$yay -Rns"
|
|
alias Ss="$yay -Ss"
|
|
alias Si="$yay -Si"
|
|
alias Q="$yay -Q"
|
|
elif [ -e "/usr/bin/pacman" ] ; then # Arch Linux
|
|
pacman="/usr/bin/pacman --color=auto"
|
|
sudopacman="sudo $pacman --color=auto"
|
|
alias S="$sudopacman -S"
|
|
alias Syy="$sudopacman -Syy"
|
|
alias Syu="$sudopacman -Syu"
|
|
alias Rns="$sudopacman -Rns"
|
|
alias Ss="$pacman -Ss"
|
|
alias Si="$pacman -Si"
|
|
alias Q="$pacman -Q"
|
|
fi
|
|
|
|
## Cygwin
|
|
# quickly get to my owncloud dir
|
|
alias cdoc="cd /cygdrive/c/Users/Nicholas/ownCloud"
|
|
|
|
alias dot="git --git-dir=$HOME/.dot/ --work-tree=$HOME"
|
|
|
|
##Convenience
|
|
alias 'mkdir=mkdir -p'
|
|
|
|
#list empty dirs
|
|
alias le="find . -type d -empty"
|