hugovk/em-keyboard

No way to specify em '-1' for :-1:

judy2k opened this issue ยท 4 comments

There is a ๐Ÿ‘Ž emoji:

em -s hand
๐Ÿ–•  middle_finger
โ˜๏ธ  point_up
๐Ÿ’ช  muscle
๐Ÿ‘Š  facepunch
๐Ÿ‘‡  point_down
โœ‹  hand
๐Ÿ‘  +1
๐Ÿค˜  sign_of_horns
๐Ÿ‘Ž  -1

But there doesn't seem to be a way of getting em to print it out (apart from searching for it)

$ em '-1'
Usage:
  em <name>... [--no-copy]
  em -s <name>...

$ em "'-1'"

$ em _1

$ em - -1
Usage:
  em <name>... [--no-copy]
  em -s <name>...

Looking at the cli code, it looks like it's a combination of arguments that begin with '-' being parsed as flags, and also the fact that '-' is translated to '_' when doing lookup.

Oh, very interesting. Might have to whitelist that one from the section that cleans those up.

Ah, i'll ignore that check if the string startswith -

I should mention that I've never created an issue with so many emoji in it before. This tool is awesome ๐Ÿ˜ƒ ๐ŸŽ‰ ๐Ÿ‘

@judy2k Thanks for raising this. I've checked the issue, It seems like - of the -1 overlaps with the argument parsing and hence never gets parsed.
I'd suggest it's better this issue is left alone and we're bound to using keywords(dislike, no ..) and others which do not contain - as starting character.

closing this now, feel free to reopen in case you want to discuss further

Thanks!