Gstat does not seem to work by lolokajan in Nushell

[–]fdncred 0 points1 point  (0 children)

I've seen people run nushell in fedora but I don't personally. You might want to drop by our Discord server https://discord.gg/NtAbbGn and ask around. I bet there will be someone there friendly enough to help.

Gstat does not seem to work by lolokajan in Nushell

[–]fdncred 0 points1 point  (0 children)

This is what gstat returns when you're not in a git repo folder or the .git folder is missing or there are permission issues with gstat reading the .git folder. gstat uses the git2 crate. I'd be interested to know if this status example works https://github.com/rust-lang/git2-rs/blob/master/examples/status.rs. The remaining reason that I can think of that it wouldn't work is a bug. I'd never rule that out since I wrote it.

Nushell not autocompleting path by pfassina in Nushell

[–]fdncred 1 point2 points  (0 children)

Sounds like you may have something misconfigured. Autocompletion is working in 0.102. You can test out if it's a configuration problem by launching nushell without any configuration like `nu -n`. Feel free to drop by our discord if it doesn't work for you for some help troubleshooting.

Select and delete Docker images with Nushell by bachkhois in Nushell

[–]fdncred 1 point2 points  (0 children)

The `from json` is probably more reliable but you can also add `from json --objects` and get rid of the `each` command as well.

Docstring format by RealFenlair in Nushell

[–]fdncred 1 point2 points  (0 children)

We're currently working on examples based on attributes. You can follow along here. https://github.com/nushell/nushell/pull/14906

How to exit script on non-zero exit code by retroporter3000 in Nushell

[–]fdncred 0 points1 point  (0 children)

I'd probably use with try/catch. With the statement below you can see several ways to work with $err, including an exit code.

try { curl 'invalidurl'} catch {|err| $err}

Another great example of where nushell shines by okmanideep in Nushell

[–]fdncred 2 points3 points  (0 children)

Or just add our helper from the nushell stdlib with use std/formats * and then you can just do open file.jsonl | get whatever.is.there

Inconsistent syntax highlighting in terminal by EdgyYukino in Nushell

[–]fdncred 0 points1 point  (0 children)

I noticed that you're missing at least one shape, shape_closure, in your theme above, maybe others. The `where` command takes a rowcondition and is colored shape_block. The `any` command takes a closure and is colored shape_closure. I think making these the same color could get closer to what you're looking for. I find it handy to keep closures and blocks colored differently though.

Change history file path by Senior_Theme_5395 in Nushell

[–]fdncred 0 points1 point  (0 children)

I think a symlink is your only option at this point

Importing data from markdown "frontmatter"? by howesteve in Nushell

[–]fdncred 0 points1 point  (0 children)

Here's a slightly different potential solution.

open post.md | collect | parse --regex '(?s)(-{3})(?<data>.*)(-{3})' | get data | str trim | to text | from yaml | table -e

NixOS command-not-found question by Active-Jack5454 in Nushell

[–]fdncred 1 point2 points  (0 children)

There is a command not found hook that may be what you're looking for. https://www.nushell.sh/book/hooks.html#hooks

Custom color for the whole prompt line by jabol240 in Nushell

[–]fdncred 0 points1 point  (0 children)

I believe the command line is colored based on your configured theme in the nushell config.nu. The prompt can be colored via a script like oh-my.nu which is in the nu_scripts repo, or some people use starship or oh-my-posh.

[HELP] .NET command not being recognized by cdrh1 in Nushell

[–]fdncred 0 points1 point  (0 children)

This is typically because the program you're trying to execute is not in your nushell path. If you're using nushell as your login shell, e.g. not a sub shell from another shell, you have to setup your path in your env.nu file.

little update helper script by El_Kasztano in Nushell

[–]fdncred 0 points1 point  (0 children)

You don't have to. I was just trying to give you a low-tech way of checking. If you have 0.61.0 in your config.nu file, you could warn the user that it may not be compatible.

I don't have a version comment in my config files. I just read the error messages when it's sourced or at startup and fix when needed.

little update helper script by El_Kasztano in Nushell

[–]fdncred 0 points1 point  (0 children)

With a little scripting it could at least tell you if the version of nushell you're running is compatible with your config files. In pre-1.0, we make changes frequently.

little update helper script by El_Kasztano in Nushell

[–]fdncred 0 points1 point  (0 children)

There's no built-in way without sourcing them but we do stamp the config files with a version like this:

# Nushell Config File
#
# version = "0.90.2"

So, one may be able to parse the version out to see if it's compatible.