shell-functools icon indicating copy to clipboard operation
shell-functools copied to clipboard

Support for function composition

Open sharkdp opened this issue 7 years ago • 1 comments

It would be great if we could compose functions before we hand them over to map or filter.

Suppose that : would be the reverse composition operator (the flipped version of .):

find | filter extension : equals "jpg" | map prepend "thumbnail_" : replace_ext "png"

sharkdp avatar Nov 26 '17 13:11 sharkdp

Using . for normal composition (like in Haskell) should actually work. It is not interpreted by (standard) shells.

sharkdp avatar Apr 08 '18 19:04 sharkdp