I can see last command in terminal by pressing up arrow
as in following example:
I typed cd /
:
Makss-Mac:~ maks$ cd /
... pressed enter
, command cd /
executed and now I can press up arrow
and see command cd /
again:
Makss-Mac:/ maks$ cd /
I want not only see last command but copy it to clipboard.
Maybe exists shortcut that not only show last command in terminal (as up arrow
do) but at the same time copy it to clipboard.
Or maybe there is shortcut for selecting all from current terminal line. And so I will be able to copy last command (after pressing up arrow
) by pressing super+c
. Of course I can select it by mouse. But when commands are in 10 times longer than cd /
it can be too time-consuming, especially if you do it every 30 seconds.
Or maybe there is way to write plugin for Terminal