Skip to content

pipe all selections through the same shell command #4205

Open
@th1j5

Description

@th1j5

Feature

A method to pipe all selections to one shell command, instead of processing each selection separate.
Right now, maybe a statefull shell command could be used (although I wouldn't know how), but if #2634 would be merged, this sure isn't the case anymore.

Usecase

If e.g. wanting to copy/process a table, multiple selections are used.
image

If I use <a-|> xclip (also as seen in the wiki), then only the last line is stored in the clipboard buffer.

Second usecase can be found in #3331

Rationale

I don't think it's possible to really neatly solve this problem outside kakoune and thus that it should be provided by kakoune itself (right?)

Design considerations

  • The separators (newline, null character, custom ;)
    In the far future maybe even a different separator depending on whether the selections continue on the same line or not (e.g. same line: tab, different line: newline)
  • Command invocation (I would expect similar to | and <a-|>)
  • My usecase is only reading (<a-|> i.e. ignoring output), but also when getting data back, how to handle this (e.g. just assume the same separators and the same lengthnumber of selections, then replace the selection with the output?)

Related

#3331

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions