[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: capture output of last command and make it availabl
Re: feature request: capture output of last command and make it available on some hotkey
Wed, 31 Jul 2013 11:45:37 -0400
On Wed, Jul 31, 2013 at 02:09:23AM +0200, Jörn Hees wrote:
> i think this would be a very useful feature and i don't seem to be alone:
Bash has no knowledge of, and no way to interact with, commands that
When bash runs a command (e.g. "cat file"), bash merely makes sure that
stdout and the other file descriptors are properly aligned, and then
calls exec(). It is the command itself (cat) which actually does the
writing, and it writes directly to the terminal, or the pipeline, or
wherever stdout is set to go.
Bash can't "capture" this in a variable. Your TERMINAL might be able to
cough up output on demand, but bash is completely unaware of the output.