5 ms·
You can use: VAR=$(!!) to accomplish something similar. Not by default of course. It re-runs the command, so if not idempotent/etc it will not return expec
by quesera 5y ago
You can use:
VAR=$(!!)
to accomplish something similar. Not by default of course.
It re-runs the command, so if not idempotent/etc it will not return expected results. Also when re-run, the command will not be in a tty context, so if the executable is sensitive to such things (e.g. `ls`), the output format might be different.
- tambourine_man 5y agoYeah, I know, but I don’t want to re-run and I want it by default.
- oh_sigh 5y agoYou could put that line in your PS1, I think?