Eu acho que você quer ler a ajuda do bash ( man bash ou BashRef.html do GNU ) na edição de linha de comando & Leia a linha. Há vários comandos diferentes para editar a linha de comando e também podem ser alterados com um arquivo inputrc (padrão ~/.inputrc ). Aqui está um clipe sobre o READLINE:
READLINE
This is the library that handles reading input when using an interactive shell, unless the --noediting option is given at shell invocation. Line editing is also used when using the -e option to the read builtin. By default, the line editing commands are similar to those of Emacs. A vi-style line editing interface is also available. Line editing can be enabled at any time using the -o emacs or -o vi options to the set builtin (see SHELL BUILTIN COMMANDS below). To turn off line editing after the shell is running, use the +o emacs or +o vi options to the set builtin.
Aqui está uma seção em "Comandos para alterar texto" ao sobrescrever:
overwrite-mode
Toggle overwrite mode. With an explicit positive numeric argument, switches to overwrite mode. With an explicit non-positive numeric argument, switches to insert mode. This command affects only emacs mode; vi mode does overwrite differently. Each call to readline() starts in insert mode. In overwrite mode, charac‐ ters bound to self-insert replace the text at point rather than pushing the text to the right. Characters bound to back‐ ward-delete-char replace the character before point with a space. By default, this command is unbound.
Não acho que haja uma ligação de chave padrão para o modo de substituição. CTRL + p é a chave do histórico anterior padrão, igual à seta para cima aqui (Linux Mint XFCE). Não tenho certeza de como o arquivo bash ou inputrc está configurado, mas talvez você esteja no vi em vez do modo Emacs ou tenha um conjunto de chaves para o modo sobrescrever?
-
Talvez esteja desenhando os personagens de maneira engraçada, você poderia tentar pular para o item de histórico anterior ou seguinte (eu faria as teclas para cima e para baixo) e isso deveria redesenhar a linha.
-
Ou talvez você tenha executado alguns comandos que atrapalharam sua tela de terminal (talvez matando um programa), você poderia tentar um comando
resete ele deve definir as coisas de volta para "normal"