loading...
Cover image for Adding Emoji 🔥 to your terminal

Adding Emoji 🔥 to your terminal

anthonydelgado profile image Anthony Delgado ・1 min read

If you are staring at a terminal all day coding, it is important to customize and personalize your work environment as much as possible. Besides changing the color of your terminal mac, adding an Emoji (or two) to your terminal is a fun, fast and easy way to customize your setup. In a recent Gist that I created for some members of my dev team I show you just how to do that!

Step 1. Open up your .bash_profile in your favorite text editor.

sublime ~/.bash_profile

Step 1.1 If the file doesn't yet exist you can create it)

cd ~
touch .bash_profile

Step 2 Add this line to the bottom of the file

The \W is the Working directory that you are currently inside of and you can add an unlimited amount of emoji to your terminal after that.

PS1="\W 🔥🦄 "

Step 3 - Save and Exit / Restart Terminal & Enjoy!

Alt text of image

The result is something like this.

You can use this generator to fully customize the hell out of your command prompt.

How else do you customize your dev setup?

👇 Leave your setup hacks in the comment section below. 👇

Happy Hacking!

Discussion

pic
Editor guide
Collapse
defman profile image
Sergey Kislyakov 🇷🇺🇺🇸

I'll stick to something without emojies on Linux. They don't look good enough to use them (they are monochrome).

Collapse
tbodt profile image
tbodt

You should get a nice emoji font

Collapse
defman profile image
Sergey Kislyakov 🇷🇺🇺🇸

It's not about fonts. Colored emoji ain't a thing on Linux atm, though IIRC Gnome has fixed that somehow, but I don't use Gnome.

Collapse
jess profile image
Collapse
ben profile image
Ben Halpern

My terminal has a new look

Collapse
acarl005 profile image
Andy

Anyone having issues with the line not wrapping properly? I'm getting a bug like this: unix.stackexchange.com/questions/1...

But instead of the issue coming from color codes, it seems to be the emoji causing the problem. Not sure what to do about that.

Collapse
remco profile image
Remco

Found it! At least in iTerm2!

If you open you preferences and go to "Profiles→Text" and then switch on "Use Unicode Version 9 Widths" (It's on the right side) then the issue will be gone!

Source: gitlab.com/gnachman/iterm2/issues/...

Collapse
remco profile image
Remco

Did you manage to fix this problem? I finally figured out this was caused by the Emoji's I've been using, but not a lot of people seem to experience this problem.

Collapse
martin profile image
Martin Beentjes

I always have been wondering what the advantage is of using emoji's in the terminal. I just prefer to use ANSI colored text. Biggest reason for myself: it gives me the possibility to share my dot files with many different platforms where I work on.

Still, it kinda looks cool. Just how @ben has a wonderful little unicorn.

Collapse
stephanie profile image
Stephanie Handsteiner

Just do source .bash_profile to have the file reloaded. :)

I'm using emojis to display the status of the repo in the prompt, like stashed files, uncommitted one's, etc. :)

Collapse
xcodemanolo profile image
Manuel Navarro

Hi, Stephanie !
How do yo display the status of the stashed files, uncommitted one's, etc ?
Can you share those lines of code with us, please ?

Thanks !!!, Have a great day !!!

Collapse
vblazenka profile image
Vedran Blaženka

I have this look for some time now. :)

My terminal

Collapse
rbo13 profile image
Richard Burk

How did you do this? Mind if I ask? Its my first time customizing my terminal though :)

Thanks!

Collapse
vblazenka profile image
Vedran Blaženka

Hey, sorry I didn't saw you comment. Did you manage to do this or do you still need help?

Thread Thread
rbo13 profile image
Richard Burk

Nope, unfortunately. Do you mind if I ask? Or can I see it on how you do it? It seems cool terminal🔥

Thread Thread
moopet profile image
Ben Sinclair

powerline-shell is an easy way to get all this stuff going.

Collapse
sanderfish profile image
Sander Visser

This is cool! Any ideas on how to do this in iTerm?

Collapse
sanderfish profile image
Sander Visser

Oops, I got so used to it that I forgot that I had oh my zsh installed. Changed it in the theme there. Thanks, super rad!

Collapse
dschep profile image
Daniel Schep

How are terminals handling the fact that emoji aren't the same width as the other characters? This is the main reason(also, they're greyscale) I don't use them in my terminal (gnome-terminal).

Collapse
6ones profile image
Chidindu Promise Ogbonna

For bash I use Bash-it,
for zsh I use oh-my-zsh