Tab doesn't auto complete any more. #25
I'm having this issue, too. I am okay with tab not going to the end. I can use ^E to jump to the end of the line and accept the suggestion and ^F to jump to the next work.
But tabbing should still suggest something. I type cd ~/somed for somedirectory, but all that shows up is somedumbdirectory and it goes away when you hit tab. Super frustrating when you remember the start of the name of a directory but can't remember it.
Using the ^T thing to toggle it off doesn't bring back the old suggestion system either :-(
I tried disabling zsh-history-substring-search (and indeed, I did need to source it first to work at all).
The goal would for it to be similar to fish.
Here's my .zshrc (using antigen):
# start antigen
source $HOME/.antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
antigen bundle command-not-found
# Fish-like bundles
antigen bundle zsh-users/fizsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search
antigen bundle tarruda/zsh-autosuggestions
# Load the theme.
antigen theme apple
# Tell antigen that you're done.
antigen apply
# end antigen
# history-substring-search config
# bind UP and DOWN arrow keys
zmodload zsh/terminfo
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
# autosuggestions config
# Enable autosuggestions automatically
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init
bindkey '^f' vi-forward-blank-word
bindkey '^T' autosuggest-toggleComment the line in you zshrc COMPLETION_WAITING_DOTS="true", your tab function will back.
when this option is true, oh-my-zsh will create a wrapper for zle widget expand-or-complete called expand-or-complete-with-dots in oh-my-zsh/lib/completion.zsh
back to the repo, expand-or-complete-with-dots is not list in the ZLE_AUTOSUGGEST_COMPLETION_WIDGETS array, so the zle alias hook can not be trigger, this is why tab doesn't complete anything.
but there's a problem I don't know how to fix, not familiar with zsh script, if I add expand-or-complete-with-dots to the array manually, the hook is triggered, but it cause endless recursive, because
it's a wrapper of expand-or-complete, and is listed in ZLE_AUTOSUGGEST_COMPLETION_WIDGETS...
@JeffChien : I'm having the same trouble but adding COMPLETION_WAITING_DOTS="true" to my .zshrc doesn't solve it. Did I miss something ?
Hi @tarruda,
First of all, this looks great! Thanks for creating it.
My problem is, after I enable this plugin, the native zsh auto completion stop working.
For example, when I
cdto some dir and clicktabfor some dir name suggestion, it won't show up any more.The suggestion by
zsh-autosuggestionscan not be accepted by thetabkey as well. They just disappears after i clicktab.Here is my
.zshrc, maybe helpful for identifying the problem.