CotEditor icon indicating copy to clipboard operation
CotEditor copied to clipboard

cot: reading from standard input

Open hanche opened this issue 4 years ago • 1 comments

Consider this a feature request:

I sometimes want to pipe output of some command into cot in order to read it in the cot editor. However, the way this currently works, cot appears to read from stdin only for about 150 milliseconds or so. Hence if the command takes longer than that to finish, I don't get all the output. Oddly, in my experiments, even cot -n works that way.

I assume this behaviour is so the user can just run cot in the terminal and get a new editor window. But I would like an option to capture all the input from stdin until EOF.

I suggest following the standard practice of using just a hyphen “-” to stand for standard input, so the user could type cot - to capture stdin – all of it – and open an editor window on the result.

hanche avatar Apr 25 '21 12:04 hanche

Hi, thank you for your feedback. I have not implemented this request yet. Instead, I improved the cot command to read piped text entirely even it is large. This change will be applied to the next CotEditor, which will be released within this month.

1024jp avatar Jun 24 '21 11:06 1024jp