Earlier quoted context omitted.
You don't need to know what branch you're on before running commands? I cant tell you the number of times ive been on the wrong branch executing stuff.
I'm highly aware of which branch I'm on. Because it's because I don't use any scripts or automation that switches branches; I only ever switch branches manually so I have that awareness.
Starship: A minimal, fast, and customizable prompt for any shell
81–90 of 216 posts
Re: Starship: A minimal, fast, and customizable prompt for any shell
#82It's very minimal while having useful features: - exit codes, even for pipelines - git branch, status (displayed as a dot if your tree is dirty) and ahead/behind counts - command execution time (if above some configurable threshold) - truncated/minified $CWD, always maintaining the git root's name (I sometimes like it, sometimes don't; fortunately, it's very easy to change) - current vi-like mode (I don't use that)
It's very fast and async (prompt repaints don't block your input or running commands), and totals 132 lines of fish (according to cloc[1]). It's also very customisable through variables, which can be declared as universal to instantly change on all sessions you have open.
If you're on fish and like this feature set, definitely give it a shot, or at least look at the code as a base for a bespoke prompt :P
[0]: https://github.com/jorgebucaran/hydro [1]: https://github.com/AlDanial/cloc
Re: Starship: A minimal, fast, and customizable prompt for any shell
#83Love the performance. Written in Rust and compiled to binary, it's _much_ faster than either python-based powerline, the bash-shell-based ohmybash and zshell-based ohmyzsh and spaceship.
You can use it for zsh, bash, sh, fish. but you can also use it for both MS Windows CMD and Powershell. I don't believe any other prompt tools can do all at the same time. And a single config file can control all of them on your system.
The default config is just that - a default. Too much information? you can change it. dont like icons? you can remove them.
At almost 100 modules to choose from, it's customization options are nearly limitless
Re: Starship: A minimal, fast, and customizable prompt for any shell
#84Earlier quoted context omitted.
If you're used to, say, VS Code or the GitHub online editor where the lag between pressing a key on the keyboard and a corresponding character appearing on the screen can be on the order of tens of thousands of milliseconds, then 100 ms will seem like lightning.
There's a thousand milliseconds in a second. If your VSCode is taking +10 seconds to display a single character, it might be time to upgrade from your Commodore 64.
Re: Starship: A minimal, fast, and customizable prompt for any shell
#85I know not everyone likes blinged out shells, but if you're a ZSH user, it fits very well into the Prezto/oh-my-zsh model.
Re: Starship: A minimal, fast, and customizable prompt for any shell
#86I like maximalist prompts, and indeed Starship is what Shell Bling Ubuntu [1] installs on a new dev machine. But they're not everyone's cup of tea. If I wanted to recommend to someone the min-maxed, highest density thing they could add to their prompt, it would simply be the time your current prompt appeared + the amount of time the last command you ran took. These two pieces of information together make it very easy…
Re: Starship: A minimal, fast, and customizable prompt for any shell
#87Re: Starship: A minimal, fast, and customizable prompt for any shell
#88I live in the terminal, so I wrote my own prompt ages ago when I started learning Go[1][2], and before that I had a simple prompt in bash. I like to keep things very simple and fast, so the directory and the git branch is all I need. I wonder if people really use all that information or if they set it up thinking they need it, but then never do. [1]: https://git.sr.ht/~jamesponddotco/gosh [2]: I should probably updat…
The only thing I add is the time (hh:mm:ss), it's often-ish useful to roughly know how long a command has been running for (or how long it took after it completed)
Re: Starship: A minimal, fast, and customizable prompt for any shell
#89Re: Starship: A minimal, fast, and customizable prompt for any shell
#90Earlier quoted context omitted.
When you’re debugging, especially a complex system, especially during an outage or postmortem, understanding when your commands executed relative to when your log lines appeared is really helpful.
That's a poor and hacky substitute of using Linux audit features. It's perhaps the right robustness/complexity trade off for my personal machine, but for work they likely already have audit features turned on and you can access the timing from there.