Autocompletion broken #73

Closed
desyncr opened this Issue Sep 17, 2015 · 14 comments

6 participants

@desyncr
zsh-users member

This was reported at #29 by @k4nar . I'm facing the same issue so here is a proper issue for it.

Autocompletion for files, git etc is not working with this plugin loaded. Unloading the plugin fixes the problem.

I'm using antigen.

Will add more info when I have time to take a deeper look at the problem.

@faceleg faceleg added the question label Sep 17, 2015
@maksimr

+1

If comment this code system completion work

@faceleg

PR?

@maksimr

@faceleg I will try fix it more robust, when I will understand root of the problem.
Thanks

@faceleg

💃

@Minizarbi

I think I have the same problem, the "tab" completion doesn't work.
I am using Antigen & OhMyZsh.
I use @maksimr fix as a workaround.
Here is my .zshrc:

source ~/.zsh/antigen/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

# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
unset COMPLETION_WAITING_DOTS

# Fish-like suggestions bundle
antigen bundle tarruda/zsh-autosuggestions

# Right arrow to the entire suggestion
AUTOSUGGESTION_ACCEPT_RIGHT_ARROW=1

# Enable autosuggestions automatically
zle-line-init() {
    zle autosuggest-start
}
zle -N zle-line-init

# Load the theme.
antigen theme fishy

# Tell antigen that you're done.
antigen apply


# use ctrl+t to toggle autosuggestions(hopefully this wont be needed as
# zsh-autosuggestions is designed to be unobtrusive
bindkey '^T' autosuggest-toggle

# Use vim or gvim with v
if [[ -n $DISPLAY ]]; then
    alias v='gvim'
else
    alias v='vim'
fi
@ericfreese
zsh-users member

There's a rewrite underway in PR #91. It's available on branch v0.1.x. Please try using that branch, and let me know if it solves your problem.

@Minizarbi

It seems i doesn't, and doesn't change anything but the syntax of .zshrc file I had to change, I just followed the instructions you gave me, I still have not standard completion.
I also stopped using this fish-like completion some time ago.

Maybe it is just the way I installed and configured it, since other people seem to not have the same problem.

@bermanmaxim

I'm having no tab autocompletion either, even on the v0.1.x branch

@ericfreese
zsh-users member

@Minizarbi @bermanmaxim Can you specify exactly what is not working for you?

Does this fail for you?

gif

I typed cd /A then pressed tab to autocomplete to cd /Applications/.

Then deleted back to cd / and pressed tab again. This brought up the list below of suggestions. Pressing tab then cycles through the suggestions.

It would also be helpful to know which version of zsh you're running, which os, other plugins you have configured, other .zshrc configurations.

A recorded gif of the specific problem would be awesome as well.

Thanks

@ericfreese
zsh-users member

Ok, I am able to reproduce this by adding compinit to my .zshrc.

autoload -Uz compinit && compinit

Looking in to it.

@ericfreese ericfreese added this to the v0.1.0 milestone Jan 29, 2016
@ericfreese
zsh-users member

Should be fixed with cd705a0. There are still minor issues with the buffer displaying incorrectly while inside menu selection, but it should work for the most part. Please pull and try again.

@ericfreese ericfreese closed this Jan 29, 2016
@Minizarbi

My zsh version: zsh 5.2 (x86_64-unknown-linux-gnu)
System: ArchLinux 4.3.3-3

The problem:
Just the tab key does nothing.
I start typing cd /, some fish-like suggestions appears (in gray) but I just press tab, and nothing happens, the fish suggestion is still there.
I can accept the fish suggestion pressing →, but tab is still not working.
It works when I don't use zsh-autosuggestions.

My .zshrc:

source ~/.zsh/antigen/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

# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
unset COMPLETION_WAITING_DOTS

# Fish-like suggestions bundle
antigen bundle tarruda/zsh-autosuggestions --branch=v0.1.x zsh-autosuggestions.zsh

# Enable autosuggestions automatically
zle-line-init() {
#   zle autosuggest-start
    autosuggest_start
}
zle -N zle-line-init

# Load the theme.
antigen theme fishy

# Tell antigen that you're done.
antigen apply
@ericfreese
zsh-users member

Thanks for the details. I'll take a look at this tonight.

Are you positive you're running the most recent version of the 0.1.x branch? This sounds a lot like the behavior pre-cd705a0.

@Minizarbi

I just removed my antigen repos about zsh-autosugg, and installed it again from your branch with antigen bundle tarruda/zsh-autosuggestions --branch=v0.1.x zsh-autosuggestions.zsh and now it (the tab completion) seems to work, thank you, so I guess now it has to be accepted as a PR or something like this?

This was referenced Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment