amp icon indicating copy to clipboard operation
amp copied to clipboard

[Feature Request] pipe selected lines thru external command

Open rialpamu opened this issue 5 years ago • 2 comments

A similar function to vi's (or vim's)

:!<range>external_command

Send selected lines to external command and replace lines by output ot the command. If no lines are selected: Insert output at current line (above?, below?).

'!' key may prompt for external command in SELECT [LINE] mode.

rialpamu avatar Mar 21 '20 14:03 rialpamu

Hi @rialpamu! Interesting, can I ask for an example that would illustrate this use case? It might align with/be solved by other features I have in mind.

jmacdonald avatar Mar 21 '20 19:03 jmacdonald

Worth addition is to maybe only do replace if the external command succeded, for example I i should pipe this through some external translation tool. And it crashes halfway, it would be nice to not have my text replaced by "segmentation fault" or whatever

TotalKrill avatar Mar 24 '20 10:03 TotalKrill