Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save felixrieseberg/f5591839c7962d1f9886a15eba615207 to your computer and use it in GitHub Desktop.
Save felixrieseberg/f5591839c7962d1f9886a15eba615207 to your computer and use it in GitHub Desktop.
emoji.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}โžœ :%{$fg_bold[red]%}โžœ %s)"
EMOJI=(๐Ÿ’ฉ ๐Ÿฆ ๐Ÿš€ ๐Ÿž ๐ŸŽจ ๐Ÿ• ๐Ÿญ ๐Ÿ‘ฝ โ˜•๏ธ ๐Ÿ”ฌ ๐Ÿ’€ ๐Ÿท ๐Ÿผ ๐Ÿถ ๐Ÿธ ๐Ÿง ๐Ÿณ ๐Ÿ” ๐Ÿฃ ๐Ÿป ๐Ÿ”ฎ ๐Ÿ’ฐ ๐Ÿ’Ž ๐Ÿ’พ ๐Ÿ’œ ๐Ÿช ๐ŸŒž ๐ŸŒ ๐ŸŒ ๐Ÿ“ ๐Ÿ„ )
function random_emoji {
echo -n "$EMOJI[$RANDOM%$#EMOJI+1]"
}
function get_pwd(){
git_root=$PWD
while [[ $git_root != / && ! -e $git_root/.git ]]; do
git_root=$git_root:h
done
if [[ $git_root = / ]]; then
unset git_root
prompt_short_dir=%~
else
parent=${git_root%\/*}
prompt_short_dir=${PWD#$parent/}
fi
echo $prompt_short_dir
}
PROMPT='$(random_emoji) $ret_status %{$fg[white]%}$(get_pwd) $(git_prompt_info)%{$reset_color%}%{$reset_color%} '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment