This is a ZSH version of the excellent emojify by Justyna Rachowicz. Thanks Justyna!
I came across this issue on the original repository and, even though a port to ZSH wasn't needed, I thought "why not? 🤷♂️"
ZSH, albeit less common, is a shell more powerful than BASH. Since I've ported
it, I also took time to solve some issues I had with the emojify script, mainly
the fact that it relied on $IFS
to make the substitution and ZSH has a nice
regex-replace
function that works much better in this case, so issues like
this shouldn't happen.
Just add zemojify
to your $PATH
and you're good to go.
If you use Zplug, you can add zemojify
with the following:
zplug filipekiss/zemojify, as:"command"
If you wanna replace emojify
zplug filipekiss/zemojify, as:"command", rename-to:emojify
If you use emojify
, zemojify
is a drop-in replacement. (In fact, you can
even name it emojify
and it will work as expected.)
zemojify "Welcome to Narnia! :lion_face:
Output: Welcome to Narnia! :lion_face:
git log --color | zemojify | less
Add this to your .zshrc
(( $+commands[zemojify]] )) && export PAGER="zemojify | ${PAGER}"
MIT