Skip to content

Proposal: re-direct stderr to file for Nushell, at least #124

Description

@Gastove

Hello!

So: nushell has the idiosyncratic property of providing things like deprecation warnings... which you cannot silence. This means that every time they change their API -- which is not super infrequent, given the youth of the project -- the shell keeps working but exec-path-from-shell breaks. This is because, currently, stdout and stderr are both captured by call-process in the same buffer, which winds up looking like:

❯ nu -i -l -c "[ $env.\"LSP_USE_PLISTS\"?, $env.\"GPG_TTY\"? $env.\"PATH\"?] | to json"
Warning: nu::parser::deprecated

  ⚠ Flag deprecated.
    ╭─[/nix/store/xp056rsbl9jn312zdrlv1b1dbybfbh27-atuin-nushell-config.nu:18:19]
 17 │ let _atuin_pre_execution = {||
 18 │     if ($nu | get -i history-enabled) == false {
    ·                   ─┬
    ·                    ╰── get --ignore-errors was deprecated in 0.106.0 and will be removed in a future release.
 19 │         return
    ╰────
  help: This flag has been renamed to `--optional (-o)` to better reflect its behavior.

[
  "true",
  "/dev/pts/1",
  [
    "/home/rdonaldson/.config/carapace/bin",
    "/you/get/the/idea/this/part/is/valid/json"
  ]
]

It's "working", it's just not working, y'know?

For Nushell, at least, I'd like to suggest some version of the following (which I'm happy to PR):

  • Re-direct stderr to a log file at a configurable path.
  • Switch to a different Emacs process creation function.

Personally, #1 sounds just great to me -- this could be behind a defcustom or similar if it's not a behavior that should be activated all the time. I'm also game to fix this in my own configs if this isn't a behavior you want in this library.

Thanks so much for the excellent project -- this and use-package have made my life vastly simpler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions