Teditor icon indicating copy to clipboard operation
Teditor copied to clipboard

Add support for pipes

Open trqt opened this issue 4 years ago • 5 comments

$ echo string | ./ted 2021-08-01T15:29:51,151068207-03:00

trqt avatar Aug 01 '21 18:08 trqt

What's wrong? I never said that it works with pipes

arthurbacci avatar Aug 01 '21 21:08 arthurbacci

What should be done in this case? echo string | ted should be the same as echo string > ~/.config/ted/buffer and echo string | ted file.txt the same as echo string > file.txt? But and echo string | ted file1.txt file2.txt? The same as echo a | tee file1.txt > file2.txt? Or should it just print an error message and die? Or should it try to remove all files in /?

arthurbacci avatar Aug 01 '21 21:08 arthurbacci

sussy Fixed?

arthurbacci avatar Aug 01 '21 22:08 arthurbacci

What should be done in this case? echo string | ted should be the same as echo string > ~/.config/ted/buffer and echo string | ted file.txt the same as echo string > file.txt? But and echo string | ted file1.txt file2.txt? The same as echo a | tee file1.txt > file2.txt? Or should it just print an error message and die? Or should it try to remove all files in /?

It should paste the stdin in the file and start editing it, it already does that, but it hangs in the process

trqt avatar Aug 09 '21 20:08 trqt