Last active
April 27, 2018 15:40
-
-
Save jshwlkr/13fa237d41eee79b8c379555c7ac25f2 to your computer and use it in GitHub Desktop.
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
# http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/ | |
# rearrange and colorize prompt | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
# add flags for ls: colorize output, add a slash after a directory, make sizes human readable | |
alias ls='ls -GFh' | |
# https://spin.atomicobject.com/2016/05/28/log-bash-history/ | |
# formats and exports command history | |
export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> ~/.logs/bash-history-$(date "+%Y-%m-%d").log; fi' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment