Giter VIP home page Giter VIP logo

Comments (5)

alper avatar alper commented on June 20, 2024 1

Documentation addition in: #5834

from starship.

alper avatar alper commented on June 20, 2024

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.

strafe avatar strafe commented on June 20, 2024

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.

alper avatar alper commented on June 20, 2024

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.

alper avatar alper commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.