Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.