github/gemoji — pull request #44 by mislav (2014-03-13 01:26:58+00:00)
Title: Adds support for aliases

```rb
require 'emoji/aliases'
Emoji.aliases_for('smile') #=> [...]
```

The use-case is to enhance the completion suggester for entering emojis.

This initial set of aliases is inspired by @muan's [emojis.json](https://github.com/muan/emoji/blob/cfb6f00843442fdbd97f6fe9e921447ac6d9663b/emojis.json).

This is :construction: :construction: since there are a couple of open questions:

* Is it OK to keep the list in YAML? It could be a plain text file just as well. I only want to keep it line-based for easier editing & diffs.
* Is it useful that this is an optional require, or should it come by default when you require `(g)emoji`?
* There is already a scheme for aliasing via symlinks. The following emojis already had multiple names:

names
Unicode description

:laughing:
laughing, satisfied
smiling face with open mouth and tightly-closed eyes

:hankey:
hankey, poop, shit
pile of poo

:boom:
boom, collision
collision symbol

:+1:
+1, thumbsup
thumbs up sign

:-1:
-1, thumbsdown
thumbs down sign

:facepunch:
facepunch, punch
fisted hand sign

:hand:
hand, raised_hand
raised hand

:runner:
runner, running
runner

:mans_shoe:
mans_shoe, shoe
mans shoe

:shirt:
shirt, tshirt
t-shirt

:bee:
bee, honeybee
honeybee

:dolphin:
dolphin, flipper
dolphin

:feet:
feet, paw_prints
paw prints

:moon:
moon, waxing_gibbous_moon
waxing gibbous moon symbol

:phone:
phone, telephone
black telephone

:hocho:
hocho, knife
hocho

:email:
email, envelope
envelope

:memo:
memo, pencil
memo

:book:
book, open_book
open book

:boat:
boat, sailboat
sailboat

:car:
car, red_car
automobile

:izakaya_lantern:
izakaya_lantern, lantern
izakaya lantern

:gb:
gb, uk
regional indicator symbol letter g + b

:exclamation:
exclamation, heavy_exclamation_mark
heavy exclamation mark symbol

This PR adds another scheme for aliasing, and now we end up with 2 levels of aliasing, which I don't like. I would prefer to get rid of multiple aliases on the filesystem and just go the route with aliases kept in a data file. However, if we delete the filesystem aliases then we break backwards compatibility, since people might be using `:knife:` in their textareas and `knife.png` in their apps.