Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

support pipes for basic commands with a workaround #5

@amtoine

Description

@amtoine

from amtoine/dotfiles#31

i would like to add the following kind of script to the nushell config:

# rm trough pipe
#
# Example
# ls *.txt | first 5 | pipe rm
export def "pipe rm" [] {
  if not ($in | is-empty) {
    get name 
    | ansi strip
    | par-each {|file| 
        rm -rf $file
      } 
    | flatten
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions