After the last system update the ctrl + left/right arrow command on zsh terminal doesn't do anything. Also ctrl+ u has something wrong because usually that command erase from the cursor to the beginning of the line, while now erase entire line.. Someone knows how to solve these problems? thank you all.
Ctrl+U is most likely because you've got the cursor at the end of the line. Secondly, which version of Gentoo are you referring to as the "last system update"?
And what would you like the ctrl+left/right to do?
Add to zsh config:
bindkey '^[[1;5C' emacs-forward-word bindkey '^[^[[D' emacs-backward-word
And from old scrap i found (might help):
bindkey ";5C" forward-word bindkey ";5D" backward-word
or have a look at this link, which should help you out?
Note: If the config works but the supposed keys doesn't do what you want it's perhaps because the key-definition differs from yours and mine, do:
cat > /dev/null
and press the keys you'd like to get outputted and adjust accordingly.
What works doesn't directly depend on the distro (Gentoo, Debian, RHEL etc.) or the shell (ZSH, KSH, BASH) - it depends on which
terminal emulator is used, and its settings: konsole, terminator, urxvt, lx-terminal etc. The distro may matter if it uses a different standard shell config (fx. .zshrc), and if using a different shell that shells config on that distro may already handle it.
Here's a few terminal emulator-specific solutions:
urxvt/rxvt-unicode (and maybe others):
bindkey "^[Od" backward-word bindkey "^[Oc" forward-word
terminator, konsole and xterm (and maybe others):
bindkey "^[[1;5D" backward-word bindkey "^[[1;5C" forward-word
For a more general approach you start your terminal, press CTRL-V followed by the key combination you want the escape code (the name) of - in this case the key combinations CTRL-leftarrow and CTRL-rightarrow - and put the output for each key combination in between the two quotes.