completion icon indicating copy to clipboard operation
completion copied to clipboard

`Tab` on the empty `BUFFER`

Open kaznovac opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.
Pressing Tab (^I) on the empty (and/or whitespaces only) BUFFER just prints the Tab character. note: BackTab from input module works as expected

Describe the solution you'd like
Run the completer as is, or maybe offer to configure something like magic-enter or navi

Describe alternatives you've considered
I've added this to .zshrc but it does not feel as well integrated as the rest of the ZIMFW (e.g. cannot move through the files - might make sense when there are some suffix aliases).

# complete on initial tab
zstyle ':completion:*' insert-tab false
# do not ask when menu should scroll
export LISTMAX=-1
#zstyle ':completion:*' list-prompt ''
#zstyle ':completion:*' select-prompt ''

function expand-or-complete-or-list-files() {
    if [[ -z ${BUFFER} ]]; then
        BUFFER="ls "
        CURSOR=3
        zle list-choices
        zle backward-kill-word
    else
        zle expand-or-complete
    fi
}
zle -N expand-or-complete-or-list-files
bindkey '^I' expand-or-complete-or-list-files

Additional context
macos terminal

kaznovac avatar Mar 29 '23 11:03 kaznovac