Skip to content

Instantly share code, notes, and snippets.

@stijnj
Created May 20, 2011 13:40
Show Gist options
  • Save stijnj/982904 to your computer and use it in GitHub Desktop.
Save stijnj/982904 to your computer and use it in GitHub Desktop.
My bash profile
# Avoid duplicate commands in the history
export HISTCONTROL=ignoredups;
# Make it less case sensitive
shopt -s nocaseglob
# Make the PS1 better
source ~/.git-completion.sh
PS1='\e[0;34m\][\t] \e[0;32m\]\w`__git_ps1`:\e[0m\] '
# Make ls behave like ls -ahl
alias ls='ls -ahl'
# Show some colors
export CLICOLOR=1
# Better unicode support
export LC_CTYPE=en_US.UTF-8
# Prettier git log
alias gs='git status -sb'
alias gc='git commit -a'
alias gl='git log -20 --oneline --graph --decorate --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset"'
@tmcls
Copy link

tmcls commented May 20, 2011

Prachtig !!!

@wimhendrikx
Copy link

Wat is die PS1?
"Make the PS1 BETTER" is beter engels.

@janfabry
Copy link

  • Mijn PS1 toont enkel de huidige directory, niet het hele pad: PS1="\[\033[00;32m\]\u@\h \[\033[00;34m\]\W $ \[\033[00m\]"
  • Grep en ls in kleur (misschien zit dat al in CLICOLOR?): alias grep='grep --color'; alias ls='ls -G'
  • Een commando om gemakkelijk PHP-functies te zoeken als je in een directory zit: function frep() { grep -E -r -n "function &?$1" *; }
  • Betere Unicode-ondersteuning: export LC_CTYPE=en_US.UTF-8
  • Bash completion via MacPorts (auto-aanvullen van commando's)
  • En dan uiteraard om met een glimlach te kunnen werken: fortune!

@stijnj
Copy link
Author

stijnj commented May 21, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment