Eshell redirection
Posted: - Modified: | emacsMike Mattie has this awesome Emacs tip for
Eshell: redirecting to buffers and Lisp symbols!
To overwrite buffer “foo”:
ls > #<buffer foo>
To append to buffer “foo”:
ls >> #<buffer foo>
To insert at point in buffer “foo”:
ls >>> #<buffer foo>
To redirect to a Lisp symbol:
ls >#'some-variable
I had no idea Emacs could do that. Cool!
E-Mail from Mike Mattie
Random Emacs symbol: ps-extend-face-list – Function: Extend face in ALIST-SYM.
Thanks to David Ongaro for catching that!
5 comments
David Ongaro
2010-03-04T15:55:27ZNice. But probably the main points got lost in the various (?) migrations of your block. It should probably read like this:
To overwrite buffer "foo":
ls > #
To append to buffer "foo":
ls >> #
To insert at point in buffer "foo":
ls >>> #
Sacha Chua
2010-03-04T20:30:56ZThanks for catching that! =)
David Ongaro
2010-03-04T15:59:59ZI see, I have to escape the > and < myself X-)
To overwrite buffer “foo”:
ls > #<buffer foo>
To append to buffer “foo”:
ls >> #<buffer foo>
To insert at point in buffer “foo”:
ls >>> #<buffer foo>
palacechan
2012-11-02T20:55:37ZWhy does something like this generate a redirection error though?
for i in 13 288 3 {echo "$i " | wc -c } > #
Invalid redirection target: (#)
Invalid redirection target: (#)
Invalid redirection target: (#)
Sacha Chua
2012-11-02T22:16:35ZDid you specify the buffer, like this? #<buffer whatever>