Skip to content

Idea: Tagging external programs with marshalling commands #451

Closed

Description

@eira-fransham

It would be useful to be able to "tag" external programs (using some kind of per-file or per-command metadata) with input-marshalling and output-marshalling shell scripts, so that (for example) git branch | sort-by name or git status | where status == Untracked | git add do what you'd expect. You could include a standard set of these and/or have them be easy to add manually, like which some-command | add-input-filter $it { skip 1 | split-by ' | ' }, for example. This means that external commands could look like internal commands without the hassle of having to write a fully-fledged plugin.

Obviously an alternative is to replace the program entirely with your own script, but this is a far lighter-weight alternative that encourages doing it for any program you need to use, plus it makes it much easier to remove filters where they're unnecessary. Not to mention that since this would only make sense with nu itself, replacing the program would essentially confine you to not being able to use any other shell unless you did some crazy $PATH shenanigans.

Activity

  1. added
    delight
    on Aug 27, 2019
  2. wycats commented on Aug 27, 2019

    @wycats
    Contributor

    This is a really cool idea. You could put this kind of thing in config, but it seems like it would want to be generally shared. Any thoughts on an MVP approach?

  3. added
    category:enhancement
    on Feb 23, 2020
  4. github-actions commented on Jun 24, 2021

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  5. github-actions commented on Jul 7, 2021

    @github-actions

    This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.

  6. eira-fransham commented on Mar 11, 2025

    @eira-fransham
    Author

    Hey @wycats (or whoever else is involved nowadays), I randomly remembered this issue 6 years later, was there ever any work on this? I know a couple of people mentioned it in other issues but I'm out of the loop on Nushell nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:enhancementdelight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions