dotfiles/.shell_settings

44 lines
794 B
Plaintext

# Navigation
if [[ ! "$OSTYPE" == darwin* ]];
then
alias ls="ls --color=auto"
fi
alias c="clear & ls"
alias ..="cd .."
alias la="ls -lha"
# Applications
alias tmux="tmux -2"
# Computer information & control
alias df="df -h"
alias reboot="echo That would be bad..."
alias shutdown="echo Don't do that"
# Git
alias gp="git pull"
alias ga="git add "
alias gl="git log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short"
alias gc="git commit -m "
alias gs="git status"
alias gpp="git push"
# Autoenv
if [ -d ~/.autoenv ];
then
source ~/.autoenv/activate.sh
fi
# Functions
# (f)ind by (n)ame
# usage: fn foo
# to find all files containing 'foo' in the name
function fn() {
if [ $# -eq 2 ]; then
sudo find $1 -name $2
elif [ $# -eq 1 ]; then
find `pwd` -name $1
fi
}