You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our sample prompts are mostly a random grab bag of prompts someone wrote once.
We should see that the selection
is distinct - there's no real reason for two prompts that just differ in a color or one bit of information
is well-written
uses our common facilities (e.g. fish_vcs_prompt) where desirable
Personally, I would:
kick out the "justadollar" prompt because I don't think it serves most people well and is trivial to write yourself
remove the "informative vcs" prompt because the informative git status is sloooooow - or make it, ironically, not "informative"
remove two out of three "classic" prompts
remove the "screen savvy" prompt because I have no idea what it's for - where is $WINDOW set?
add debian chroot support to other prompts and remove that one
rename the prompts named after a single person because some may have... "spicy" opinions that don't align with our CoC and we don't want to appear like we're condoning those
We might also want to add new prompts - what are y'all using? Anyone have a cool prompt they want to share?
Reacted by Peter Ammon, Johannes Altmanninger and charego
Highly agreed, I was just thinking about this myself 👍 I think a very simple pure-style prompt would be a great addition, though that does kinda step on third-party authors' toes 😄
Alright, here's a screenshot of what the prompts currently look like, in an actual terminal:
The first thing you'll notice here is that these are almost all variations on a very simple theme, basically:
user@host pwd status/vcs glyph
Some leave off one or more of these or add a little special thing (debian chroot has the debian chroot, "informative" has the time), but the bulk of these stick very closely to that idea.
In particular:
"debian_chroot" is literally the classic prompt plus a debian chroot display that I'm not sure is actually used - you would need to specifically select it in the chroot (this is the sort of thing that's really only worth it as a default, and then it shouldn't just be for debian specifically - I've asked for this before and been met with resistance)
classic status/vcs are just straight upgrades of each other - these could just be one prompt with easily removable bits
I have no idea what lonetwin and screen savvy are
acidhub, terlar, robbyrussell and sorin use their own git logic - this should probably be centralized in the git prompt (and robbyrussell specifically does the awful thing of checking git status just to determine if there is anything - effectively asking for a full directory scan when the first hit would suffice)
Alright, that was a bit of a project, and I'm calling it done for now.
Here's roughly what changed since 3.2:
The classic, classic+status, classic+vcs were unified as one "default" prompt.
The debian chroot prompt was removed, the special thing it did was put into the prompt_login helper function that's used by the default and terlar prompts - this also means you'll get the logic by default
The robbyrussell prompt was renamed to "arrow" and no longer uses git status --porcelain just to figure out if the repo is dirty, improving performance in slow git repos. The sorin prompt was renamed to "scales".
The "justadollar", "screen_savvy" and "lonetwin" promps were removed as they didn't do anything special (and justadollar in particular is unhelpful and easy to write yourself)
Two new prompts were added - "simple", which is roughly along the lines of a "nice" bash prompt - just user@host, prompt_pwd and a user symbol ("$" or "#" depending on if you're root). No frills, no vcs prompt, no nothing. And "disco", which is my own prompt and a bit more... playful than the rest. It colors $PWD, shows USER@HOST when in a remote environment (ssh or vm), has a right prompt with vcs info (with some settings I like).
Selecting a prompt can now be done via fish_config prompt, including e.g. fish_config prompt choose arrow in config.fish, so it's easier to switch in non-desktop machines (e.g. via ssh).
The default prompt now handles dumb environments (i.e. TERM=dumb) better
fish_config now handles right prompts
This leaves us with a total of 12 instead of 16 prompts, but they are more distinct from one another and in some cases faster and less buggy.
Now, this isn't "done", it'll never be fully done. I'd still be willing to accept people submitting interesting, even goofy, prompts provided they are well-written and, when they use an external dependency, handle failure well.
Other enhancements, e.g. using fish_git_prompt instead of bespoke git logic or spicing up prompt_login to support other kinds of "machines", can simply be done later.
Activity
IlanCosman commentedon Mar 31, 2021
Highly agreed, I was just thinking about this myself 👍 I think a very simple pure-style prompt would be a great addition, though that does kinda step on third-party authors' toes 😄
faho commentedon Apr 2, 2021
Alright, here's a screenshot of what the prompts currently look like, in an actual terminal:
The first thing you'll notice here is that these are almost all variations on a very simple theme, basically:
Some leave off one or more of these or add a little special thing (debian chroot has the debian chroot, "informative" has the time), but the bulk of these stick very closely to that idea.
In particular:
"debian_chroot" is literally the classic prompt plus a debian chroot display that I'm not sure is actually used - you would need to specifically select it in the chroot (this is the sort of thing that's really only worth it as a default, and then it shouldn't just be for debian specifically - I've asked for this before and been met with resistance)
classic status/vcs are just straight upgrades of each other - these could just be one prompt with easily removable bits
I have no idea what lonetwin and screen savvy are
acidhub, terlar, robbyrussell and sorin use their own git logic - this should probably be centralized in the git prompt (and robbyrussell specifically does the awful thing of checking
git statusjust to determine if there is anything - effectively asking for a full directory scan when the first hit would suffice)faho commentedon May 2, 2021
Alright, that was a bit of a project, and I'm calling it done for now.
Here's roughly what changed since 3.2:
git status --porcelainjust to figure out if the repo is dirty, improving performance in slow git repos. The sorin prompt was renamed to "scales".fish_config prompt, including e.g.fish_config prompt choose arrowin config.fish, so it's easier to switch in non-desktop machines (e.g. via ssh).This leaves us with a total of 12 instead of 16 prompts, but they are more distinct from one another and in some cases faster and less buggy.
Now, this isn't "done", it'll never be fully done. I'd still be willing to accept people submitting interesting, even goofy, prompts provided they are well-written and, when they use an external dependency, handle failure well.
Other enhancements, e.g. using fish_git_prompt instead of bespoke git logic or spicing up prompt_login to support other kinds of "machines", can simply be done later.
To top it off, here's a screenshot: