Comments (5)
Documentation addition in: #5834
from starship.
I think right now things are working as expected?
I can imagine the use case of having one prompt_format override another one could be something that's desirable in more situations where there are competing package managers (though it's a hairy discussion to get into).
Probably easiest to say: X is more specific than Y so if X is there then don't show Y. That would pre-empt any debates between pnpm/yarn/bun etc.
Does such a functionality exist already in starship or would it need to be built?
from starship.
Probably easiest to say: X is more specific than Y so if X is there then don't show Y. That would pre-empt any debates between pnpm/yarn/bun etc.
My problem with this is that you're lumping Bun in with pnpm and yarn. Bun is a JavaScript runtime first and a package manager second. Like Deno, it's meant to replace Node.js, you do not need Node.js installed to use Bun.
from starship.
Can we leave behind the confusing overgrowth of javascript packaging tools?
You want to be able to say: in the bun
module that if it's on, it should override the nodejs
and not display that. Right?
That information would have to go somewhere in: https://github.com/starship/starship/blob/master/src/configs/bun.rs#L10
And the be resolved later as an exclusion.
I assume Starship already has certain detections that are able to take precedence over others, or the capability to match file negatively. If bun.lockb or bunfig.toml are present, only display the bun runtime info and not Node.js info.
That does not seem to be the case. I could work on this and then check whether it makes sense to lift this into a more general facility.
from starship.
You can add a negative match to your nodejs
module config:
[nodejs]
detect_files = ['package.json', '.node-version', '!bun.lockb']
I think it may be a bit much to add that into the node module as a default? But I think it's worth a try. Of course that would be annoying if people don't have the bun module enabled in which case they would not see anything and think the nodejs module is buggy.
Otherwise this could be added as documentation for the bun module.
from starship.
Related Issues (20)
- [BUG] direnv style specifies a non-standard color HOT 1
- [custom] Inconsistent handling of colors from subshell when using custom module HOT 2
- Add option for aliasing known hostnames in config
- `starship module ...` not displaying any output to stdin with the exception of `starship module character`
- Kubernetes module not working on Powershell
- .gitconfig file triggers "git" section HOT 1
- [Feat.Req] P10k like instant prompt
- Starship not honoring `add_newline = false`
- over-eager language detection logic causes noisy, false info in prompts
- kubernetes module ignores detect_files setting HOT 3
- `nix shell` module HOT 4
- [WARN] - (starship::config): Error in 'Character' at 'symbol': Unknown key HOT 3
- FR: Transient Prompt Post Execution Update
- Nix flake module support HOT 1
- some commands when executed freezes for around 10 seconds before showing Error: i/o timeout and finishing.
- Executing command timed out HOT 1
- Feature Request: Add Native git_user Submodule for Displaying Git User Information
- Newly added color aliases prev_bg/prev_fg don't work in right_format HOT 4
- Click to download link TOML doesn't work for Nerd Font Symbols Preset HOT 4
- Setting a large command_timeout causes performance drop in Git repos HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starship.