I could spend hours figuring out all those things, bit I'd rather use that time for something more important.
I could spend hours figuring out all those things, bit I'd rather use that time for something more important.
Configuration is straightforward and easy imo: https://starship.rs/config/
Give it a spin, I think you won't regret it.
Only drawback is that it's not POSIX, no issue for me, but maybe for people who have a lot of muscle memory with bash.
First, there are some ways to make fish more compatible with bash.
If you want to do some shell scripting in fish, or running other people's shell scripts (or commands) this may aid you since you wouldn't have to port them (or take less time to port them over).
You can achieve this with a plugin system such as 'oh my fish' or 'fisher'. But, as always, it adds complexity (and bloat :P), you'll need it on every fish shell (including remote systems), etc.
It is a bit akin to having nvim with plugins versus being able to use vi. Sometimes, you're going to need to be able to use the latter.
Also, to people who recently adopted fish: fish has been made more and more compatible with bash throughout those years.
FWIW, I use fish with starship these days.
and script.sh just starts with #/bin/bash
I'm simple
The way I actually have things setup, in case it helps. I don't change my default shell. I actually default to pretty much working within tmux. So, I kept my default shell to what the OS brings, then in my tmux config, I have,
# set shell
set -g default-shell /opt/homebrew/bin/fish
This means, that when I start my terminal, it drops me to zsh (macOS default). Then when I run tmux, it opens fish. The nice thing is that I inherit the environment of zsh.I have my .zshrc and my .bashrc sourcing a .shellrc file which contains most of my env stuff. This keeps random utilities that write to .bashrc and zshrc working within fish too.
Shell scripts from third parties stick with whatever shell they were written for (ie. /bin/sh or /usr/bin/env bash), and commands copy/pasted from the internet are either quickly executed with bash (one-off) or ported over. Because I like to have such in my history (fish is configured to use atuin), I want to keep using the same shell, so I try to stick with fish. If I cannot convert a command (usually a bunch of commands) to fish, it is PEBCAK and a learning curve/experience.
As for tmux, that is solid advice, because it also allows to stick with a shell which is known to work. I've come to like zellij with alacritty, with zellij the option is default_shell. But now that I use ghostty, I don't use a terminal multiplexer locally any more; only remotely. And there I still use tmux.
Fish is nicer to script in by far, and you can keep those isolated with shebang lines and still run Bash scripts (with a proper shebang line). The only thing that’s tricky is `source` and equivalents, but I don’t think I’ve ever needed this in my main shell and not a throw-away sub shell.
I guess that somewhat breaks with fish: either you use bash -c '...' from the start, or you adopt the fish syntax, which means you need to convert again when you switch to a (bash) script.
I also don’t trust myself to not screw up anything more complex than running a command on Bash, without the guard rails of something like shellcheck!
I don't care for mile-long prompts displaying everything under the sun, so zsh is plenty fast.
Later I found fizsh, which I love and still use as default shell now. It's basically a configuration around zsh adding the colors, completions, and other good stuff inspired by fish to zsh. Can really recommend it for those who are used to zsh or bash but want their CLI to be more readable. Colors especially help with big command line arguments to show where they start and end, and keeping track of complex stuff like loops and conditional logic in your commands.
https://starship.rs/presets/gruvbox-rainbow
You can see that when the segments are empty, they still appear as a 1-width segment, rather than entirely disappearing.
It also makes you configure many things by hand. powerlevel10k has an interactive wizard that lets you design your prompt one option at a time (do you want a nerd font? do you want it one line or two? etc) but Starship makes you manually write escape codes if your preferences don't match one of the presets.
No judgment, but I do wonder what people like about Starship that makes up for these things.
https://starship.rs/presets/#pastel-powerline
I tried making my own and the config TOML syntax isn't expressive enough to support hiding empty segments.
You're right that it's the thing with the Unicode character as separator, which all the alternatives handle just fine: powerlevel10k, tide, oh-my-posh... it's just everyone seems to love Starship, and that's what confuses me.
"Transient prompt, when enabled, replaces the prompt with a simpler one to allow more screen real estate." https://ohmyposh.dev/docs/configuration/transient
Here is my config for oh-my-posh https://github.com/rofrol/dotfiles/blob/master/.config/oh-my...
Wait till people learn they can use rlwrap to get the benefit of readline even in things like commandline sql clients, which often lack this.
One thing which is not in the writeup but should be (and I mention it in a sibling thread) is "rlwrap" which is a readline wrapper which imbues whatever program with readline editing and history niceness.
So say you have to use some crufty cli like a sql cli or something that doesn't have commandline editing or history. You run "rlwrap horrible_sql_cli" aaand now it does. Really helpful.
I don't know if starship is still using Zle. If so, this should be possible to configure without OMZ.
Nice history, command auto complete, and similar beyond just the looks, out of the box
After installing and adding it to my bashrc, I was wondering was those version numbers and cloud symbols meant. Turns out: Since NodeJS and Python were installed, it found a good idea to print the respective versions. I could not care less about those versions. The other part was that it thought that I would like to see my AWS region. Well, I mean, I have built something with AWS a few years back, and the config file for that still exists, but no, I don't want to see that region every time I open a shell. Finally, the default is to have the prompt in a new line. I think when you have a long prompt that makes sense, and it might also be a taste thing. However, the documentation has this example at the beginning about newlines:
# Inserts a blank line between shell prompts
add_newline = true
So I thought `add_newline = false` should do the trick, but it didn't.Luckily, the AI (GPT-5.2) was pretty good at explaining and giving instructions for changing things. So after 30 minutes, everything was understood and configured to my liking. I like the result, but the default was pretty weird.
"Transient prompt, when enabled, replaces the prompt with a simpler one to allow more screen real estate." https://ohmyposh.dev/docs/configuration/transient
Here is my config for oh-my-posh https://github.com/rofrol/dotfiles/blob/master/.config/oh-my...
That already defeats the purpose:
I don't want to copy things around
I never spend time crafting a custom config
oh my zsh can recreate much of the fish functionality while maintaining good bash interoperability.
bash <enter>
<paste> <enter>
exit <enter>
Tada!Except for the single step workflow: <paste> <enter> like you do on POSIX shells?
Do you get it now?
There's so many better non-shite alternatives. Just one: Zim aka zimfw is one. It's just so sad that there's such a negative creep energy towards "I tried nothing and did nothing and this is where I am". Bad hacker bad. You deserve no voice.
I'm joking but on a more serious note, installing a shell as a default shell seems more complicated than copying over your .bashrc
more complicated than copying over your .bashrc
In case you weren't aware, MacOS uses zsh as the default installed shell. The bash version that comes with MacOS is some ancient 3.x version, from 2005.Maybe I'm underinformed, but I don't personally know any Linux users who convert to zsh, instead opting for fish or something else (oilsh? nushell?).
So I removed it, then continued using Zsh and whenever I missed something from before I looked up what it was and installed the plugin easily with Homebrew. The whole process took under an hour. I realised I only needed two or three plugins.
Now my shell is fast, without unnecessary bloat, and does what I need. I’m much more productive and happier, and at the end of the day I don’t really see what’s more important than that (within the scope of the conversation).
This post is explaining how to set up those things. Less than five minutes to read.
OMZ is still easier to set up consistently. That’s why we use it.
If the concern is the bloat of OMZ then make FMZ - fast my zsh - that is just as quick to set up and doesn’t add “bloat”?
It’s a single command to install oh-my-zsh. I can fire it off, check Slack, and come back in 5 minutes. If I have to take 5 minutes to setup it up, I’m just not going to do it.
In your defense I must say I installed starship ages ago but still not migrated to it from powerline-go because I'm lazy.
And from the article
> Because cloud services are available globally, I've disabled them.
That's some bad defaults right there.
> When you run a command, it also shows how long it took to execute.
No I absolutely don't want this thing done by the author. Now I am fully in the "customize my config" territory.
Also, most of us are unlike the author, and 0.07s vs 0.38s startup time means no difference.
I think the point of the previous comment has been more than clear enough.
That's quite likely a workflow thing. If you are popping up new (transient) terminals frequently, then a ~400ms wait time for each adds up and makes the entire machine feel really slow. I'm willing to wait extra half a second for a new terminal -- once -- after I've changed my autocompletion configs (rebuild + rehash takes a while), but if I had to wait for that long every time I hit Win+enter and wait for the terminal to become active, I'd be irritated pretty damn quickly too.
You get conditioned to immediate responses pretty fast.
OMZ has been working steadily for me for the past 8+ years. Autocomplete, syntax highlighting, and a concise prompt--really all I need.