3 ms·
Why not just do this in your personal shell theme? When I made my own when I got finally got serious about refreshing my ZSH environment years back, one of the
by xoa 10y ago
Why not just do this in your personal shell theme? When I made my own when I got finally got serious about refreshing my ZSH environment years back, one of the first things I made sure to have was that a root shell was well highlighted with a bright red. You can build your prompt with a conditional %(!.true.false) for whether the shell is running with privileges, and/or different conditionals for whether the shell is a specific UID. Section 13.3 of the manual covers conditional substrings in prompts, and it makes for a pretty flexible foundation to add visual cues under various conditions.
This in turn leads to the core major issue I've always had with something like iTerm: ultimately it's a struggle to find much supplied by a higher level GUI application that I can't do and for that matter wouldn't much prefer to do purely within the shell. Of course, the given terminal does need to be capable of handling the basics, in terms of full color, UTF and all that, and there was a time where iTerm was well ahead of Terminal.app there. But I think since at least OS X 10.8 or so Terminal.app has been good enough that zsh/tmux etc can handle the rest, and the result is a setup that's a lot more flexible in terms of what systems it will work on and can be work on from. And that seems like a pretty valuable point of CLI in and of itself.
Stuff like the password manager actually does interest me as a stop-gap for servers where I'm unable to have proper shared keys, but a lot of what they list almost seem like anti-features, replicating (poorly or not) stuff better done within the environment in a non-portable way.