Created
May 20, 2011 13:40
-
-
Save stijnj/982904 to your computer and use it in GitHub Desktop.
My bash profile
This file contains 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
# 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"' |
Wat is die PS1?
"Make the PS1 BETTER" is beter engels.
- 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
!
PS1 is de shell variable die het stukje voor hetgeen je typt in Terminal. Moeilijk uit te leggen :)
Lees dit maar eens: http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prachtig !!!