Abaixo está meu .inputrc
arquivo. Por que, depois de ligar bind ~/.inputrc
, minha tecla de barra superior fica desativada até eu sair e fazer login novamente?
# Key-bindings for the command-line editor.
# Ask before displaying >50 items
# Since $WINDIR $PATH var can be in $PATH, this could list
# all window exectables in C:\WINDOWS
set completion-query-items 50
# Ignore case for the command-line-completion functionality
# on: default to a Windows style console
# off: default to a *nix style console
set completion-ignore-case on
# none, visible or audible
set bell-style audible
# disable/enable 8bit input
set meta-flag on
set input-meta on
set output-meta off
set convert-meta on
# visible-stats
# Append a mark according to the file type in a listing
set visible-stats off
set mark-directories on
# Show all instead of beeping first
set show-all-if-ambiguous on
"\e[1~": beginning-of-line #HOME
"\e[4~": end-of-line #END
"\e[A":history-search-backward #UP
"\e[B":history-search-forward #DOWN
Responder1
Porque bind ~/.inputrc
é um comando para vincular a sequência de teclas /home/aliteralmind/inputrc
onde /home/aliteralmind
está seu diretório inicial. Isso se liga /
a uma chave de prefixo para a qual nenhuma ligação está definida, portanto, pressionar a /
tecla depois não faz nada.
Para ler um arquivo readline do bash, use
bind -f ~/.inputrc
Este exemplo em particular não é muito útil, pois ~/.inputrc
é lido quando o bash é iniciado. A única utilidade é carregar suas novas ligações se você alterar o arquivo (isso não removerá as ligações que você removeu).