Skip to content

Instantly share code, notes, and snippets.

@osmszk
Created April 5, 2015 03:46
Show Gist options
  • Save osmszk/dedb01a6c6fedc735dea to your computer and use it in GitHub Desktop.
Save osmszk/dedb01a6c6fedc735dea to your computer and use it in GitHub Desktop.
bashrc
#commnd aliases
alias ll='ls -la'
case "${OSTYPE}" in
darwin*)
alias ls="ls -G"
alias ll="ls -laG"
alias la="ls -laG"
;;
linux*)
alias ls='ls --color'
alias ll='ls -la --color'
alias la='ls -la --color'
;;
esac
alias rm='rm -i'
alias emacs='emacs -nw'
alias f="open ."
dic () {
w3m "http://ejje.weblio.jp/content/$1" | grep "用例"
}
cdf () {
target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
if [ "$target" != "" ]
then
cd "$target"
pwd
else
echo 'No Finder window found' >&2
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment