For example:
…/.config master on AWS_Prod (use2)
starship.toml: [aws]
format = 'on [($profile )(\($region\) )]($style)'
style = 'bold #B23D2F'
symbol = " " <- cloud symbol
[aws.region_aliases]
us-east-1 = 'use1'
us-east-2 = 'use2'`git status` to know git stuff. `pwd` for the current working directory, etc
I also don't use aliases like `gs` or `..`
One good thing about having a very minimal setup is that you feel at home anywhere.
It wasn't always like this. I used many, many prompts and shell tools over the decades. The only tool that stood the test of time is tmux.
I can sit down at (or ssh into) any machine and be basically just as productive, and it also turns out that I just always want to know more than nicely fits into the prompt anyways.
There's something to be said for accepting the defaults of a tool, and learning to use them well. Customization is powerful, but... I think most times it's not the right call until you're already an expert in the tool at hand.
Sort of contrary to that I really enjoy the maximalist shells. A computer should be fun to use!
So if you have
``` src/components/Button.vue src/components/ButtonGroup.vue ```
And you type `nvim s/c/G<Tab>` it’ll expand to the second file’s path.
For example if I have say 3 worktrees open in 3 seperate tmux tabs and are context switching between them (very common when reviewing multiple PRs from my devs) Sometimes i will get the tabs mixed up, which worktree is where etc and just autopilot a bunch of commands meant for one tree into a different one and its quite annoying to clean up.
The prompt has generally stopped me from doing that.
Usually, there will be from 2 to 8 panels of different sizes.
This gives me spacial short term memory: I know what each shell is by the panel position.
I can zoom on then to bring them full screen (ctrl+b z) if I'm going to do anything that requires more space, then zoom out to the panel arrangement when I'm done.
Sometimes I'll name prompts (eg `PS1='stg$ '`), specially when working with ssh, but that's rare.
What inspired me to work this way was this video on the acme editor: https://www.youtube.com/watch?v=dP1xVpMPn8M
tmux comes from BSD rather thsn GNU/Linux, or Windows
What is the default shell in OpenBSD
starship does not support it
starship init ksh
ksh is not yet supported by starship.
For the time being, we support the following shells:
* bash
* elvish
* fish
* ion
* powershell
* tcsh
* zsh
* nu
* xonsh
* cmd
Please open an issue in the starship repo if you would like to see support for ksh:
https://github.com/starship/starship/issues/newFor example, I don’t expect running scripts/build.sh to modify tracked files in the repo. Seeing part of the prompt go from “” to “?2!3” (two untracked, three changed files) makes that glaringly obvious.
And the Branch is also an unintrusive reminder that you are in a path under versioncontrol.
I’m a researcher and work on small projects with 1-3 people (most of the time it’s just me prototyping stuff alone). I then tend to work on a branch for weeks at a time, so the git branch provides very little information compared to the space it takes in a prompt.
If I was switching branches every 5min, it would be useful.
I found out that with this verify-and-forget step, I work much more efficiently.
As a result, my workflow becomes independent of the machine I work on, because I become the tool, not my setup. After that point, only having a "$" at the beginning of the line is enough.
Of course everyone have their own choices, and YMMV.
Also, I somehow worked in special characters for Python and other things that get screwed up if I don’t have the right nerd font installed on the system.
Even for cases where I need to use old versions, I don’t need a reminder of that every time I run a command.
It isn't that useful but I do glance it when I'm working on dependencies and to ensure the context between a terminal session and pycharm's interpreter match.
The information doesn't cloud the prompt for me though, as it is right justified and I don't really think about time to load, as the machines are relatively recent Apple Silicon.
You can always time your commands with "time".
Here's one zbell implementation, not sure it's the original but it looks like it does the trick: https://gist.github.com/oknowton/8346801
I developed the tool myself, and it's at https://git.sr.ht/~bayindirh/nudge if you feel like checking it out.
If you want to host the whole push notification infrastructure, you can look at https://ntfy.sh which also can be integrated with cURL.
Something like
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
shopt -s histappend
really ought to be default in bash.It's not as clear why you need it in the interactive prompt.
It sounds silly, but it has saved my butt more than once. Especially if you have bugs that e.g. only show up once per hour on the hour, and are otherwise fine.
It's a personal machine and should be treated as disposable. Doing anything less is fairly irresponsible.
So sure - turn on timestamps for your ssh bastion (although it should be in the logs already...), or turn them on for the ci/cd pipeline (not that you should need them there anyways, since it should be dumping tons of timing info already).
But a personal machine? Plain ol' ">" is plenty.
Not that there's anything wrong with a maximal prompt either... I've definitely done the "configure all the powerline settings!" thing. But I also don't mind a simple ">" or "#".
That way you only have to look at it when you need it, and you can also figure out what you were doing last week/month/year if necessary.