Created
March 9, 2017 21:10
-
-
Save kindlyfire/1832748adbbbe2053410c4fd76bdf891 to your computer and use it in GitHub Desktop.
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
# 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