X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=241030451e2d8c99750404fa3802bb4d02caf9f7;hb=e82bb71fc732483b11b875a725677a4724851422;hp=1f8cdaa8cba388b5adf9a4459aafdca17df326a9;hpb=4a336083bc64bef499992eb9716184d6691f8cef;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1f8cdaa..2410304 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -625,14 +625,18 @@ bindkey "\e[1;5D" backward-word bindkey '^[[1;3C' forward-word bindkey '^[[1;3D' backward-word -bindkey '^xp' history-beginning-search-backward -bindkey '^xP' history-beginning-search-forward -bindkey "\e[5~" history-beginning-search-backward #PageUp -bindkey "\e[6~" history-beginning-search-forward #PageDown +# Search backward in the history for a line beginning with the current +# line up to the cursor and move the cursor to the end of the line then +zle -N history-beginning-search-backward-end history-search-end +zle -N history-beginning-search-forward-end history-search-end +bindkey '^xp' history-beginning-search-backward-end +bindkey '^xP' history-beginning-search-forward-end +bindkey "\e[5~" history-beginning-search-backward-end # PageUp +bindkey "\e[6~" history-beginning-search-forward-end # PageDown + # bindkey -s '^L' "|less\n" # ctrl-L pipes to less # bindkey -s '^B' " &\n" # ctrl-B runs it in the background - # insert unicode character # usage example: 'ctrl-x i' 00A7 'ctrl-x i' will give you an ยง # See for example http://unicode.org/charts/ for unicode characters code