[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature request: capture output of last command and make it available on
From: |
Jörn Hees |
Subject: |
feature request: capture output of last command and make it available on some hotkey |
Date: |
Wed, 31 Jul 2013 02:09:23 +0200 |
Hi,
i think this would be a very useful feature and i don't seem to be alone:
http://stackoverflow.com/questions/5955577/bash-automatically-capture-output-of-last-executed-command-into-a-variable
http://unix.stackexchange.com/questions/9024/how-do-i-reuse-the-last-output-from-the-command-line
There are a lot of hackish solutions how you could achieve this, but since
readline actually provides the yank-last-arg it would somehow be cool to also
have a yank-last-output-line, maybe on M-, instead of M-.
As outputs might get pretty big, maybe bash could remember up to the the first
and last 10 lines of output of the previous command. After that counting
usually gets slower than using another approach anyhow.
Use cases:
- type some command, realize you want to do something with the last line of the
output, for example view the path written there, type "less ", hit [esc] [,],
done…
- whenever you used your mouse to copy that one line from the last output just
to reinsert it after the command you just typed.
Cheers,
Jörn
- feature request: capture output of last command and make it available on some hotkey,
Jörn Hees <=