Bash: cleanup aliases.
This commit is contained in:
parent
d13337e536
commit
5bcf42bdbd
@ -1,4 +1,4 @@
|
|||||||
# Easier navigation: .., ..., ...., ....., ~ and -
|
# Easier navigation
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias ...="cd ../.."
|
alias ...="cd ../.."
|
||||||
alias ....="cd ../../.."
|
alias ....="cd ../../.."
|
||||||
@ -8,11 +8,10 @@ alias -- -="cd -" # The alias is `-`, not `--`
|
|||||||
|
|
||||||
# Shortcuts
|
# Shortcuts
|
||||||
alias dr="cd ~/Dropbox"
|
alias dr="cd ~/Dropbox"
|
||||||
#alias dl="cd ~/Downloads"
|
|
||||||
#alias dt="cd ~/Desktop"
|
|
||||||
alias pj="cd ~/Dropbox/Projects"
|
alias pj="cd ~/Dropbox/Projects"
|
||||||
alias o="open"
|
alias o="open"
|
||||||
alias oo="open ."
|
alias oo="open ."
|
||||||
|
alias marked="open -a marked"
|
||||||
|
|
||||||
# Detect which `ls` flavor is in use
|
# Detect which `ls` flavor is in use
|
||||||
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
if ls --color > /dev/null 2>&1; then # GNU `ls`
|
||||||
@ -23,10 +22,10 @@ fi
|
|||||||
|
|
||||||
# Always use color output for `ls`
|
# Always use color output for `ls`
|
||||||
alias ls="command ls ${colorflag}"
|
alias ls="command ls ${colorflag}"
|
||||||
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
|
export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:"
|
||||||
|
|
||||||
# Enable aliases to be sudo’ed
|
# Enable aliases to be sudo’ed
|
||||||
alias sudo='sudo '
|
alias sudo="sudo "
|
||||||
|
|
||||||
# Avoid stupidity
|
# Avoid stupidity
|
||||||
alias rm="rm -i"
|
alias rm="rm -i"
|
||||||
@ -35,7 +34,7 @@ alias rm="rm -i"
|
|||||||
#alias gurl="curl --compressed"
|
#alias gurl="curl --compressed"
|
||||||
|
|
||||||
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
|
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
|
||||||
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm update npm -g; npm update -g; sudo gem update'
|
alias update="sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm update npm -g; npm update -g"
|
||||||
|
|
||||||
# Clean up LaunchServices to remove duplicates in the “Open With” menu
|
# Clean up LaunchServices to remove duplicates in the “Open With” menu
|
||||||
#alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
|
#alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
|
||||||
@ -67,13 +66,13 @@ for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Convert line endings to UNIX
|
# Convert line endings to UNIX
|
||||||
alias dos2unix="perl -pi -e 's/\r\n?/\n/g' "
|
alias dos2unix="perl -pi -e 's/\r\n?/\n/g'"
|
||||||
|
|
||||||
# Password generator
|
# Password generator
|
||||||
password() { openssl rand -base64 ${1:-8} | c; }
|
password() { openssl rand -base64 ${1:-8} | c; }
|
||||||
|
|
||||||
# Git root
|
# Git root
|
||||||
alias gr='[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`'
|
alias gr="[ ! -z `git rev-parse --show-cdup` ] && cd `git rev-parse --show-cdup || pwd`"
|
||||||
|
|
||||||
# NPM
|
# NPM
|
||||||
alias npm-patch='npm version patch -m "%s"'
|
alias npm-patch='npm version patch -m "%s"'
|
||||||
@ -81,7 +80,8 @@ alias npm-release='npm version minor -m "%s"'
|
|||||||
|
|
||||||
# Grunt
|
# Grunt
|
||||||
alias gw="grunt deploy --debug && grunt watch --debug"
|
alias gw="grunt deploy --debug && grunt watch --debug"
|
||||||
ginit() { grunt init:$@; }
|
alias gs="grunt deploy --debug && grunt serve --debug"
|
||||||
|
gi() { grunt init:$@; }
|
||||||
|
|
||||||
# Magic Project Opener
|
# Magic Project Opener
|
||||||
function proj { cd "$("$HOME/dotfiles/bin/opener.py" "$HOME/Dropbox/Projects" $1 -w project $2)"; }
|
function proj { cd "$("$HOME/dotfiles/bin/opener.py" "$HOME/Dropbox/Projects" $1 -w project $2)"; }
|
||||||
|
Loading…
Reference in New Issue
Block a user