Closed luislopes-outsystems closed 4 weeks ago
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:
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.
@ivan-the-terrible we can always check if history is available. If not, default to something sensible and not crash the initialization.
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?
@ivan-the-terrible I don't mind solving this one. Nushell is my daily driver anyways 😃
Sounds good, I'm very curious to see the result!
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.
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!
@ivan-the-terrible hope you learned something!
Code of Conduct
What happened?
When trying to use a nushell with history deactivated with nu --no-history I get the following:
history is null and this statement fails.
Theme
the error does not depend on the theme
What OS are you seeing the problem on?
Windows
Which shell are you using?
nu
Log output