mrowa44 / emojify

Emoji on the command line :scream:
MIT License
1.55k stars 70 forks source link

Support for ZSH shell #32

Closed joshuawise610 closed 6 years ago

joshuawise610 commented 6 years ago

I downloaded the emojify script and modified the script such that the shebang is !/bin/zsh to execute using the zsh shell and changed out the {BASH_VERSION} environment variable for {ZSH_VERSION}. Upon running the script using emojify :joy I get output:

emojify.sh:25: no matches found: [:grinning:]=\U1f600
parse_line:1: bad option: -a
to_emoji:1: bad math expression: empty string

This message comes up every time I try running the script regardless of what text I enter. I'm aware that zsh can support basic emoji using the emoji plugin from oh_my_zsh which I have enabled, but I am unable to work out what this error message means.

filipekiss commented 6 years ago

You don't need to make any changes to have this working on ZSH. In fact, the bash version is the problem. If you're using macOS and homebrew, just brew install bash and emojify should work without problems. If you're on linux, just google <your distro name> upgrade bash to see how to upgrade bash. :)

filipekiss commented 6 years ago

@scrunch077 I've ported this to be native to Zsh, check it out: filipekiss/zemojify

joshuawise610 commented 6 years ago

@filipekiss Sorry for taking so long to get back to you, the zemojify port you made works perfectly on my system. Thanks for your help.