Piping into less and editing: "cannot edit standard input" error. Workarounds?
16
votes
3
answers
5435
views
I recently learned that if I page my files with
less
, I can press v
and open the buffer in Emacs. This works as long as I have the environment variable $EDITOR
set up correctly, which in my case I have it as:
export EDITOR='env TERM=xterm-256color emacs -nw'
The above gives me the ability to load emacs within the terminal that runs less
.
However, the trick above does not work when **piping** commands to less
. When doing this, less
complains with the following message:
Cannot edit standard input (press RETURN)
My question is, why does this happen? But most importantly, **is there any workaround to it**?
Asked by Amelio Vazquez-Reina
(42851 rep)
Oct 25, 2011, 09:49 PM
Last activity: Jun 4, 2025, 08:17 AM
Last activity: Jun 4, 2025, 08:17 AM