Skip to content

Instantly share code, notes, and snippets.

@kindlyfire
Created March 9, 2017 21:10
Show Gist options
  • Save kindlyfire/1832748adbbbe2053410c4fd76bdf891 to your computer and use it in GitHub Desktop.
Save kindlyfire/1832748adbbbe2053410c4fd76bdf891 to your computer and use it in GitHub Desktop.
# For usage on a server
# It uses a format with the server hostname
# username@hostname ~ λ
PROMPT='%{$FG[159]%}%n%{$FG[147]%}%{$FG[147]%}@%{$FG[141]%}%m %{$FG[105]%}${_current_dir}%{$reset_color%}%{$FG[099]λ%{ %2G%}%}%{$reset_color%}'
#RPROMPT="%{$reset_color%} %K{3} %l%k"
local _current_dir="%{$FG[147]%}%3~%{$reset_color%} "
function _current_dir() {
local _max_pwd_length="65"
if [[ $(echo -n $PWD | wc -c) -gt ${_max_pwd_length} ]]; then
echo "%{$fg_bold[blue]%}%-2~ ... %3~%{$reset_color%} "
else
echo "%{$fg_bold[blue]%}%~%{$reset_color%} "
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment