Skip to content

Instantly share code, notes, and snippets.

@funrep
Created September 17, 2012 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funrep/3738583 to your computer and use it in GitHub Desktop.
Save funrep/3738583 to your computer and use it in GitHub Desktop.
doesnt work :(
PS1=$'\001\r''$(precmd)${USER:=$(ulimit -c 0; id -un 2>/dev/null || echo \?
)}@${HOSTNAME%%.*}:$(local d=${PWD:-?} p=~; [[ $p = ?(*/) ]] || \
d=${d/#$p/~};'$'\001\e[2;34m\001'' local m=${%d} n p=...; (( m > 0 )) || m=${#d}
(( m > (n = (COLUMNS/3 < 7 ? 7 : COLUMNS/3)) )) && d=${d:(-n)} || \
p=; print -nr -- "$$p$d\001\033[0;32m\001") '"$PS1 " $'\001\e[0m\001'
: ${MKSH:=$(whence -p mksh)}; export EDITOR HOSTNAME MKSH TERM USER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment