Há pouca coisa que você pode fazer para manipular a linha de comando que está digitando em um terminal do Windows. Isso faz sentido. O terminal da Microsoft é apenas um resquício do MS-DOS, que foi herdado pelas inúmeras versões do Windows para que desenvolvedores e suporte pudessem executar alguns comandos não disponíveis pelo clique de um mouse. Já no Unix a história é inversa. Durante tantas décadas sendo usado, o sistema Unix, hoje, em sua mais nova reencarnação, Linux, foi acumulando diferentes teclas de atalho para conseguirmos refazer, desfazer e fazer melhor a montagem dos comandos digitados na linha de comando. Um sistema bash padrão já deve ter implementado o mínimo que você precisa para sobreviver na linha de comando. Aparentemente esse é um conhecimento tão bem divulgado pela comunidade que ninguém se dá ao trabalho de escrever um artigo sobre isso. Eu fiz algumas pesquisas uns tempos atrás e cheguei na seguinte lista, que tem muito mais do que eu preciso, e que seria bom aprender, nem que fosse aos poucos.
- Ctrl + r - navigate previous commands
- Ctrl + a - go to the start of the command line
- Ctrl + e - go to the end of the command line
- Ctrl + k - delete from cursor to the end of the command line
- Ctrl + u - delete from cursor to the start of the command line
- Ctrl + w - delete from cursor to start of word (i.e. delete backwards one word)
- Ctrl + y - paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
- Ctrl + xx - move between start of command line and current cursor position (and back again)
- Alt + b - move backward one word (or go to start of word the cursor is currently on)
- Alt + f - move forward one word (or go to end of word the cursor is currently on)
- Alt + d - delete to end of word starting at cursor (whole word if cursor is at the beginning of word)
- Alt + c - capitalize to end of word starting at cursor (whole word if cursor is at the beginning of word)
- Alt + u - make uppercase from cursor to end of word
- Alt + l - make lowercase from cursor to end of word
- Alt + t - swap current word with previous
- Ctrl + f - move forward one character
- Ctrl + b - move backward one character
- Ctrl + d - delete character under the cursor
- Ctrl + h - delete character before the cursor
- Ctrl + t - swap character under cursor with the previous one
- Ctrl + l - clean the screen (history back)
- Ctrl + z - put in background (fg restores it)
- Ctrl + c - cancel current command
- Ctrl + d - exit the current shell