Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Most minimal configuration challenge



Concerning the bindings, I find the following for [Tab] very useful.
This is inspired by

  https://www.zsh.org/mla/users/2004/msg00743.html

(zsh-users 7732).

history-search-or-expand-or-complete()
{
  if [[ -z "$BUFFER" && -z "$PREBUFFER" ]] then
    zle history-incremental-search-backward "$@"
  else
    zle expand-or-complete "$@"
  fi
}
zle -N history-search-or-expand-or-complete
bindkey '\t' history-search-or-expand-or-complete

A [Tab] character at the beginning of the buffer is useless,
while a backward history search is common, and [Tab] is easier
to type than Ctrl-R.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




Messages sorted by: Reverse Date, Date, Thread, Author