Ho usato questo nel mio .inputrc
quando ho usato bash ma non funziona in ZSH perché ZSH non legge l'.inputrc (AFAIK):
$if Bash # Meta+O can be made to load the previous # command and position the cursor for typing an option "\eo": "\Cp\Ca\ef "
È l'unica cosa che mi manca dai miei giorni di battaglia. C'è un modo per portre questo command a ZSH? Ho provato alcuni segni di scimmia con poco successo.
Questo è vero, zsh
possiede un proprio editor di linea ( ZLE
) e non legge le istruzioni di lettura .inputrc
.
Provare:
# define widget function function cursor-after-first-word { zle up-history zle beginning-of-line zle forward-word RBUFFER=" $RBUFFER" } # create widget from function zle -N cursor-after-first-word # bind widget to ESC-o bindkey '^[o' cursor-after-first-word
Vedi l' man zshzle
su quello che è ansible.