Last active
December 15, 2016 14:44
-
-
Save crawles/30fddd440698913768ea24bf5016ee23 to your computer and use it in GitHub Desktop.
My .profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mvim () { | |
local f | |
for f; do | |
test -e "$f" || touch "$f" | |
done | |
open -a macvim "$@" | |
} | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
#The first line will tell Bash to ignore duplicated and empty history entries. | |
#The second line will merge the history of multiple open sessions | |
#(e.g. in multiple tabs or windows). | |
export HISTCONTROL=ignoreboth | |
shopt -s histappend | |
# After each command, save and reload history | |
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" | |
## arrow up | |
#"\e[A":history-search-backward | |
## arrow down | |
#"\e[B":history-search-forward | |
# Set Default Editor | |
# ------------------------------------------------------------ | |
export EDITOR=mvim | |
# Set default blocksize for ls, df, du | |
# from this: http://hints.macworld.com/comment.php?mode=view&cid=24491 | |
# ------------------------------------------------------------ | |
export BLOCKSIZE=1k | |
# Change Prompt | |
# ------------------------------------------------------------ | |
export PS1="crawles$ " | |
export PS2="crawles$ " | |
# ----------------------------- | |
# 2. MAKE TERMINAL BETTER | |
# ----------------------------- | |
alias cp='cp -iv' # Preferred 'cp' implementation | |
alias mv='mv -iv' # Preferred 'mv' implementation | |
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation | |
alias ll='ls -FGlAhp' # Preferred 'ls' implementation | |
alias less='less -FSRXc' # Preferred 'less' implementation | |
#cd() { builtin cd "$@"; ll; } # Always list directory contents upon 'cd' | |
alias cd..='cd ../' # Go back 1 directory level (for fast typers) | |
alias ..='cd ../' # Go back 1 directory level | |
alias ...='cd ../../' # Go back 2 directory levels | |
alias .3='cd ../../../' # Go back 3 directory levels | |
alias .4='cd ../../../../' # Go back 4 directory levels | |
alias .5='cd ../../../../../' # Go back 5 directory levels | |
alias .6='cd ../../../../../../' # Go back 6 directory levels | |
alias f='open -a Finder ./' # f: Opens current directory in MacOS Finder | |
alias ~="cd ~" # ~: Go Home | |
alias c='clear' | |
set -o vi | |
export PATH=$PATH:/usr/local/sbin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment