Created
July 30, 2017 16:32
-
-
Save thierrymarianne/1cbf68c8629cfa4779e113eff0c75c9d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/zsh | |
#### Usage | |
# cp emoj.zsh-theme ~/.oh-my-zsh/themes | |
# | |
## ~/..zshrc | |
# ZSH_THEME='emoj' # Mettre à jour le thème oh-my-zsh sélectionné | |
# plugins=(git emoji) # Ajout d'emoji à la liste existante des plugins | |
local last_command_failed="$emoji[lady_beetle] $emoji[face_screaming_in_fear]" | |
local last_command_succeeded="$emoji[honeybee] $emoji[relieved_face]" | |
local ret_status="%(?:%{$last_command_succeeded%}:%{$last_command_failed%})" | |
local mood_color="$bold_color%(?:%{$FG[070]%}:%{$FG[214]%})" | |
local username="${mood_color}$USER$reset_color" | |
local at=" %(?:$emoji[dragon]:$emoji[snail]%}) " | |
local host="$bold_color%(?:$FG[071]:$FG[202])%M" | |
local identity=" ${username}${at} ${host}:" | |
local current_directory="%{%c$reset_color%} " | |
PROMPT='${ret_status} ${identity}${current_directory}$(git_prompt_info)'$'\n' | |
local git_color="$bold_color%(?:$FG[022]:$FG[160])" | |
local git_branch_color="$git_color" | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$git_color%}[$reset_color%{$git_branch_color%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$git_color%}]%{$fg[yellow]%} $emoji[hatching_chick]" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$git_color%}]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment