Created
September 21, 2016 13:26
-
-
Save kindlyfire/df80fdab70aaabfe7f4656e24fa28a15 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 | |
} |
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 locally | |
# It uses a format without the server hostname | |
# username ~ λ | |
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