Re:Emacs: Mastering Eshell
by hsbauauvhabzb on Wednesday August 17, 2022 @07:21PM
(#32503098)
Thanks, I’ve faced this issue but didn’t know about gnu fold.
[ Parent
| on HN ]
Re:Emacs: Mastering Eshell
by chriswarbo on Wednesday August 17, 2022 @08:36PM
(#32503733)
Be aware that bash doesn't like being piped, and changes some of its behaviour. I work around that using expect:
- Here's the script itself https://github.com/Warbo/warbo-utilities/blob/master/raw/wra...
- Here's the accompanying expect file https://github.com/Warbo/warbo-utilities/blob/master/raw/wra...
- Here's my patched version of GNU fold, which removes some buffering https://github.com/Warbo/warbo-utilities/blob/master/raw/fol...
- Here's the resulting Nix package (along with some tests) https://github.com/Warbo/warbo-utilities/blob/master/scripts...