Skip to content

Instantly share code, notes, and snippets.

@xcsrz
Last active February 8, 2018 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xcsrz/d04fb2eb0d4d7ecee4ee8284a2661961 to your computer and use it in GitHub Desktop.
Save xcsrz/d04fb2eb0d4d7ecee4ee8284a2661961 to your computer and use it in GitHub Desktop.
Terminal "utility" to copy ASCII emoji to the clipboard on OSX
#!/bin/bash
EMOTS=(
"¯\_(ツ)_/¯"
"༼ ༎ຶ ෴ ༎ຶ༽"
"「(°ヘ°)"
"(╯°□°)╯︵ ┻━┻"
"༼ つ ◕_◕ ༽つ"
"(✿◠‿◠)"
"¯(°_o)/¯"
"(͡° ͜ʖ ͡°)"
"(ಠ_ಠ)"
"(╯_╰)"
"(─‿‿─)"
"\,,/(^_^)\,,/"
"(¬、¬)"
"(ノ゚0゚)ノ"
"(╯°□°)╯︵ ʞooqǝɔɐɟ"
"(⌐■_■)"
"╭∩╮(︶︿︶)╭∩╮"
"c[_]"
"(ง •̀_•́)ง"
"(⌐■_■)︻╦╤─ "
"(ಡ_ಡ)☞"
"◕_◕"
"(눈_눈)"
"(◔_◔)"
"\_(-_-)_/"
"⊹╰(⌣ʟ⌣)╯⊹"
)
sel=-1
while (($sel < 1))
do
for (( i = 1; i <= ${#EMOTS[@]}; i++ ))
do
echo "${i}) ${EMOTS[($i-1)]}"
done
read -p "Which one? " sel
[[ "$sel" =~ ^[0-9]+$ ]] || sel=-2
(($sel > ${#EMOTS[@]})) && sel=-3
done
echo ${EMOTS[$sel-1]} | pbcopy
echo "... copied ${EMOTS[$sel-1]} to clipboard"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment