mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-16 02:27:03 +01:00
my preferences
This commit is contained in:
parent
a4c53db893
commit
2a5b839df3
3 changed files with 205 additions and 2 deletions
54
custom/aliases.zsh
Normal file
54
custom/aliases.zsh
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Aliases in this file are bash and zsh compatible
|
||||
|
||||
oh-my-zsh=$HOME/.oh-my-zsh
|
||||
|
||||
# Get operating system
|
||||
platform='unknown'
|
||||
unamestr=$(uname)
|
||||
if [[ $unamestr == 'Linux' ]]; then
|
||||
platform='linux'
|
||||
elif [[ $unamestr == 'Darwin' ]]; then
|
||||
platform='darwin'
|
||||
fi
|
||||
|
||||
# PS
|
||||
alias psa="ps aux"
|
||||
alias psg="ps aux | grep "
|
||||
|
||||
# Moving around
|
||||
alias cdb='cd -'
|
||||
alias cls='clear;ls'
|
||||
|
||||
# Show human friendly numbers and colors
|
||||
alias df='df -h'
|
||||
alias du='du -h -d 2'
|
||||
|
||||
if [[ $platform == 'darwin' ]]; then
|
||||
alias meld='/Applications/Meld.app/Contents/MacOS/Meld'
|
||||
alias code='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code'
|
||||
# Homebrew
|
||||
alias brewu='brew update && brew upgrade && brew cleanup && brew doctor'
|
||||
fi
|
||||
|
||||
# Alias Editing
|
||||
TRAPHUP() {
|
||||
source $oh-my-zsh/custom/aliases.zsh
|
||||
}
|
||||
|
||||
alias ae='vim $oh-my-zsh/custom/aliases.zsh' #alias edit
|
||||
alias arl='source $oh-my-zsh/custom/aliases.zsh' #alias reload
|
||||
alias gar="killall -HUP -u \"$USER\" zsh" #global alias reload
|
||||
|
||||
# vim using
|
||||
mvim --version > /dev/null 2>&1
|
||||
MACVIM_INSTALLED=$?
|
||||
if [ $MACVIM_INSTALLED -eq 0 ]; then
|
||||
alias vim="mvim -v"
|
||||
fi
|
||||
|
||||
# mimic vim functions
|
||||
alias :q='exit'
|
||||
|
||||
# vimrc editing
|
||||
alias ve='vim ~/.vimrc'
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue