I used to color my prompt depending on which server I was connected to (ssh), and a different color scheme for prod, dev and local. But that was a long time ago and the script is buried somewhere, also I don't stay ssh'd to nearly as many places as I did back then. But I did like it, I'd use it now if I had it.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Color green for normal users and red for root. then date, hostname. and finally time of day
PS1="> "
There are two usability tweaks that I would find it hard to live without: (1) red prompt on last-command failure, and (2) highlight what I type, dehighlight output:
Reason for 1 is obvious, 2 is more subtle: it helps my eye scan scrollback and identify what I've typed, which is what I'm scanning for 90% of the time.
Implementations vary, here's how I do it in zsh:
PS1='%(?.%K{cyan}%F{white}.%B%K{red}%F{white})XX%b%k%f %(?.%F{cyan}.%F{red})yyy%k%b%F{yellow}%(!.#.$)%f '
. Duplication is evil, but AFAIK necessary because the conditional (error check) is%(?
and I highlight both parts of my two-part prompt. Suggestions welcome for removing the duplication.zle_highlight=("default:fg=white")
(on a Solarized Dark term, where the default fg color is light gray. Adjust to fit your needs).
Thanks for your detailed explanation! It's minimal, yet it looks very well usable.
Zsh and Starship.rs on top with few extra minor things. I like my shell fast and clean.
I use whatever is default in the distro. Debian comes with a nice one.
Fish + OMF.... Work flawlessly
I've been using zsh with "oh my zsh". I started using it as it sounded silly and fun compared to bash. Realistically it doesn't really male mich difference. I like the auto complete, but I couldn't say for sure whether it's the shell, oh-my-zsh or what. But I like it.
It's great, but that's not the prompt. The prompt is the thing that shows up before you type a command, usually with a $ or # and the current path.
I guess I only glanced and assumed they were talking about shells 🐚. I'll shut up and pay more attention in furure 🤣
I'm using guake
I like that it's just the F12 key away then F11 to expand to full window. Supports multiple tabs.
Anyone using guake?
I think you misunderstood the question.
Completely did! Thanks for being kind.
My shell prompt is stock and gets really long sometimes
I'm about to install Debian and try some other desktop environments... And maybe I'll play with my shell prompt later.
I use bash-it and set it to powerline theme
I use budspencer theme on fish. https://github.com/oh-my-fish/oh-my-fish/blob/master/docs/Themes.md#budspencer-theme It looks cool and yellow, which I like. I prints the path on the far right and parent folders are printed only with initial letter, so it doesn't take 2 lines in the shell and it ends up pretty short. It also has git integration and some budspencer exclusive commands to perform some cools actions, I don't care about and I have never used. Also, I like that command errors are displayed as ✔ or ✘ on the next prompt. It also prints the time the last command has been running. I use vi keybidings, so prompt color changes when I change the mode feel cool. I would also like to have the execution time for every command, but I have another theme for that I don't remember the name of on my work machine.