Giter Site home page Giter Site logo

Comments (8)

JanDeDobbeleer avatar JanDeDobbeleer commented on August 22, 2024 1

@ivan-the-terrible I don't mind solving this one. Nushell is my daily driver anyways 😃

from oh-my-posh.

ivan-the-terrible avatar ivan-the-terrible commented on August 22, 2024 1

Sounds good, I'm very curious to see the result!

from oh-my-posh.

fdncred avatar fdncred commented on August 22, 2024 1

Hey @JanDeDobbeleer, you maight try checking $nu.history-enabled. I'm hopeful that will work and solve this probem if put in your nushell script.

from oh-my-posh.

ivan-the-terrible avatar ivan-the-terrible commented on August 22, 2024 1

Man I am so stupid. I didn't realize this was actually affecting code here in the codebase 🤦🏼 I thought it was just an issue with the way the history command worked in Nu. My bad, @JanDeDobbeleer nice fix!

from oh-my-posh.

JanDeDobbeleer avatar JanDeDobbeleer commented on August 22, 2024 1

@ivan-the-terrible hope you learned something!

from oh-my-posh.

ivan-the-terrible avatar ivan-the-terrible commented on August 22, 2024

Unfortunately, this is not really related to oh-my-posh...
First and foremost, I've never used Nushell, but this looks really cool! So thanks for that discovery.

So I've been able to duplicate this problem within a fresh Ubuntu installation (via Docker) and have Nushell produce the same output without oh-my-posh installed:

image

Your question seems a little oxymoronic. nu --no-history will not retain history.
Piping history to last 1 will produce an error... because there is no history. Thus, history returns null and last expects a list, binary or range input.

@JanDeDobbeleer, in my opinion, this can be closed.

from oh-my-posh.

JanDeDobbeleer avatar JanDeDobbeleer commented on August 22, 2024

@ivan-the-terrible we can always check if history is available. If not, default to something sensible and not crash the initialization.

from oh-my-posh.

ivan-the-terrible avatar ivan-the-terrible commented on August 22, 2024

That makes sense. I didn't realize oh-my-posh officially supported nushell. What would be the course of action? To raise an issue or attempt to put out a PR there?

from oh-my-posh.

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.