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!
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!
Top comments (22)
I'll stick to something without emojies on Linux. They don't look good enough to use them (they are monochrome).
You should get a nice emoji font
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.
My terminal has a new look
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.
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/...
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.
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.
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. :)
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 !!!
Would you mind to share your .bash_profile, please, Stephanie ?
;-)
Uh, I'm not using bash anymore.
My .zshrc is pretty standard aside from a few plugins and powerlevel10k
I have this look for some time now. :)
How did you do this? Mind if I ask? Its my first time customizing my terminal though :)
Thanks!
Hey, sorry I didn't saw you comment. Did you manage to do this or do you still need help?
Nope, unfortunately. Do you mind if I ask? Or can I see it on how you do it? It seems cool terminal🔥
powerline-shell is an easy way to get all this stuff going.
This is cool! Any ideas on how to do this in iTerm?
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!
For bash I use Bash-it,
for zsh I use oh-my-zsh