marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.38k stars 148 forks source link

"No suffix alias found" with blank command line. #178

Closed yrammos closed 3 years ago

yrammos commented 3 years ago

372f17a07063702927abaa9d6922bf74961a8405

zsh-5.8-0-g77d203f

None

None

$ cd $(mktemp -d)  # Create a temp dir and enter it.
$ ZDOTDIR=$PWD HOME=$PWD zsh -f  # Start a subshell in it without config files.
% source path/to/zsh-autocomplete.plugin.zsh  # Source the plugin.
% <steps to reproduce>

Using the minimal shell of the bug report template, the plugin displays "No suffix alias found" underneath the command line unless at least one character has been entered.

niizam commented 3 years ago

i remove this line but still working

/zsh-autocomplete/module/.autocomplete.config

reply=( "'$h1'No ${tail:+matching }$d completions found.'$end'" )

crazy-matt commented 3 years ago

Hi guys, I have a similar issue, getting exactly a No suffix alias completions found. message below my prompt. I tried to disable this warning without any success as I'm not familiar with the zstyle syntax. Does someone have a clue about how to deal with this please?

crazy-matt commented 3 years ago

I have a suffix alias in a file sourced by my .zshrc though. I wanted to fix it by actually adding a suffix alias. But I can't figure out how to make this suffix alias visible for zsh-autocomplete

BradNut commented 3 years ago

Same issue using Oh My Zsh and the latest version of the plugin. Zsh version: zsh 5.8 (x86_64-ubuntu-linux-gnu)

Seeing the following on a blank line:

➜  ~ 
No suffix alias completions found.
marlonrichert commented 3 years ago

Fixed.

marlonrichert commented 3 years ago

I have a suffix alias in a file sourced by my .zshrc though. I wanted to fix it by actually adding a suffix alias. But I can't figure out how to make this suffix alias visible for zsh-autocomplete

@crazy-matt The "suffix alias" completion lists files in the current dir that match any of your suffix aliases. It does not list the actual aliases.

x432ph commented 3 years ago

This problem was reintroduced for me by commit 77a989a87702bcec2bee1fdb100293467b42f470.

marlonrichert commented 3 years ago

That is intentional. It says No executable file, directory or suffix alias found. when the directory you're in doesn't contain any such files. That's something I think is useful to know.

If you don't want that, you can disable it with this setting:

zstyle ':autocomplete:*' min-input 1  # characters

If it says something else completely for you, please let me know.

SaschaAdler commented 3 years ago

For me, No suffix alias found. is displayed regardless of whether min-input is set to something greater than zero, when the current working directory does not contain anything that satisfies a suffix alias. The temporary directory created in the steps to reproduce this bug doesn't contain an executable file or any subdirectories (beyond . and ..), and yet only the lack of suffix-aliased files is noted.

zsh-autocomplete version: e14687b80428eb1c22069023b5f12a2ef4f55bcb zsh version: 5.8 (whatever the Gentoo ebuild picks up. I'm not sure of the particular commit release) plugin manager: znap

Steps to reproduce:

❯ cd $(mktemp -d)
❯ ZDOTDIR=$PWD HOME=$PWD zsh -f
% zstyle ':autocomplete:*' min-input 1 && source path/to/zsh-autocomplete.plugin.zsh
%
No suffix alias found.
marlonrichert commented 3 years ago

@SaschaAdler I can reproduce the fact that min-input 1 doesn't work, but instead of No suffix alias found., I get No executable file, directory or suffix alias found. After you run your steps to reproduce, what output do you get from env?

SaschaAdler commented 3 years ago
% env
COLORFGBG=15;0
COLORTERM=truecolor
CONFIG_PROTECT=/usr/share/gnupg/qualified.txt /usr/share/config
CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/terminfo /etc/dconf /etc/ca-certificates.conf /etc/revdep-rebuild
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Y9PODphepW,guid=62a9a4ec164b389a597804aa604e09c9
DESKTOP_SESSION=/usr/share/xsessions/plasma
DISPLAY=:0
EDITOR=vim
GCC_SPECS=
GSETTINGS_BACKEND=dconf
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/sascha/.gtkrc-2.0:/home/sascha/.config/gtkrc-2.0
GTK_MODULES=canberra-gtk-module:appmenu-gtk-module
GTK_RC_FILES=/etc/gtk/gtkrc:/home/sascha/.gtkrc:/home/sascha/.config/gtkrc
HOME=/tmp/tmp.SXi7YkIJCa
INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.35.1/info:/usr/share/info
JAVAC=/etc/java-config-2/current-system-vm/bin/javac
JAVA_HOME=/etc/java-config-2/current-system-vm
JDK_HOME=/etc/java-config-2/current-system-vm
KDE_APPLICATIONS_AS_SCOPE=1
KDE_FULL_SESSION=true
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
KONSOLE_DBUS_SERVICE=:1.38
KONSOLE_DBUS_SESSION=/Sessions/3
KONSOLE_DBUS_WINDOW=/Windows/1
KONSOLE_VERSION=200803
LANG=en_CA.UTF-8
LANGUAGE=
LESS=-R -M --shift 5
LESSOPEN=|lesspipe %s
LOGNAME=sascha
MAIL=/var/mail/sascha
MANPAGER=manpager
MANPATH=/etc/java-config-2/current-system-vm/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.35.1/man:/etc/java-config-2/current-system-vm/man/:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/11/share/man
MOTD_SHOWN=pam
OLDPWD=/tmp/tmp.SXi7YkIJCa
PAGER=/usr/bin/less
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/11/bin
PROFILEHOME=
PWD=/tmp/tmp.SXi7YkIJCa
QT_AUTO_SCREEN_SCALE_FACTOR=0
SESSION_MANAGER=local/avalon:@/tmp/.ICE-unix/2821,unix/avalon:/tmp/.ICE-unix/2821
SHELL=/bin/zsh
SHELL_SESSION_ID=55def2dbc4d24224a44fd4318e22a7f5
SHLVL=2
SSH_AGENT_PID=2753
SSH_ASKPASS=/usr/bin/ksshaskpass
SSH_AUTH_SOCK=/tmp/ssh-NyvhhQa7UuSB/agent.2752
TERM=xterm-256color
UBUNTU_MENUPROXY=1
USER=sascha
WINDOWID=79691783
XAUTHORITY=/home/sascha/.Xauthority
XCURSOR_SIZE=24
XCURSOR_THEME=breeze_cursors
XDG_CONFIG_DIRS=/etc/xdg
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SESSION_TYPE=x11
XDG_VTNR=7
_=/usr/bin/env
XDG_CACHE_HOME=/home/sascha/.cache
P9K_SSH=0
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
KEYTIMEOUT=40
P9K_TTY=old
_P9K_TTY=/dev/pts/3
ZDOTDIR=/tmp/tmp.SXi7YkIJCa
XDG_DATA_HOME=/tmp/tmp.SXi7YkIJCa/.local/share
marlonrichert commented 3 years ago

Ah, of course: You don't have . in your $path (and don't have setopt autocd).

marlonrichert commented 3 years ago

Fixed.