0

Have you ever had to run a command which is not found on your system, but apt suggests you to install it running command?

Apt install suggestion

Do you know if it would be possible to autocomplete the terminal prompt with that command instead of using the mouse, select the text, copy paste (CTRL+SHIFT+C / CTRL+SHIFT+V) and enter? That part with selecting using the mouse is annoying.

I thought maybe an autocomplete of some sort exists. Or, if not, maybe I could select specifically that text, easily, using only keyboard commands. In my opinion this would be impossible, as the text is simple output text, but maybe I am wrong.

I am using gnome-terminal, which seems not to have the possibility to move a caret and select the output text.

pomsky
  • 68,507

1 Answers1

1

In general, GNOME Terminal supports tab-completion, i.e. you can automatically fill in partially typed commands by pressing the Tab key repeatedly.

For the specific case, viz. command suggested by apt to install a suggested package, you can select the suggested command (or any text for the matter) with your mouse and then click the mouse middle button. The command would be sent to the prompt. Then you just need to press Enter.

If you're really keen on not using the mouse, refer to these:

pomsky
  • 68,507