Similar to ALT-. which is introducing the last argument verbatim.
But what I was really longing for is a variable or hotkey producing the last output , alas this doesn't exist.
The closest I could find now is `!!` , I.e. to backtick the last command.
But I'd really love to facilitate this be defining a shortcut introducing `!!` ...
So I figured out bind '"\e,":"`!!`"' (ESC for ALT) which also works well on termux.
Put it into your bashrc and it'll help you to incrementally build one liners.
Dumb example:
$ bind '"\e,":"`!!`"' $ ls *re.pl tst_re.pl $ echo `!!` # typed "echo ALT-," echo `ls *re.pl` # expanded history entry tst_re.pl $
This will nest better when used repeatedly
$ bind '"\e,":"$(!!)"'
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
In reply to Re^4: perldoc -lf anomaly (OT bash last output)
by LanX
in thread perldoc -lf anomaly
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |