Skip to content

Instantly share code, notes, and snippets.

@evandhoffman
Created June 23, 2011 20:50
Show Gist options
  • Save evandhoffman/1043598 to your computer and use it in GitHub Desktop.
Save evandhoffman/1043598 to your computer and use it in GitHub Desktop.
Mac .profile for non-retarded terminal behavior
#!/bin/bash
PS1='[\d \t \u@\h \# \W]\$ '
function settitle () {
export PREV_COMMAND=${@}
export CURR_CMD=${PREV_COMMAND}
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~} : ${CURR_CMD}\007"
}
#export PROMPT_COMMAND=${PROMPT_COMMAND}';export PREV_COMMAND=""'
trap 'settitle "$BASH_COMMAND"' DEBUG
#PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}${BASH_COMMAND}${@}"; echo -ne "\007"'
NODE_PATH=/usr/local/lib/node
export PS1 NODE_PATH PROMPT_COMMAND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment