Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select text in git bash console (OS windows) use keyboard?

Tags:

git

I know how to select text in git bash console (for example: commit hash) use mouse, but how to do it use keyboard.

like image 712
john Avatar asked Mar 08 '15 11:03

john


2 Answers

If your "git bash console" runs inside cmd.exe (and in typical git installation in Windows it is), then you can use cmd.exe window context menu for selecting and pasting:

  1. Press alt+space — it will bring window context menu.
  2. Press e, k — it will select Edit -> Mark menu option.
  3. Now you can move your text cursor around cmd.exe window with arrow keys.
  4. Select block of text by holding shift key and selecting block with arrow keys.
  5. Press enter to copy selected block of text.

You can also paste text from clipboard into console using alt+space, e, p shortcut.

Note that keyboard shortcuts depend on Windows user interface language, described above commands are for English interface.

like image 163
rutsky Avatar answered Nov 15 '22 00:11

rutsky


Hold Shift Key and first click at starting of your text then click the end of your selection

like image 41
Jitendra Suthar Avatar answered Nov 15 '22 01:11

Jitendra Suthar