zsh-autocomplete icon indicating copy to clipboard operation
zsh-autocomplete copied to clipboard

Add a setting for limiting completions to a maximum number of lines

Open Lite5h4dow opened this issue 2 years ago • 5 comments

I cant seem to get the external command, ancillary manipulator command or main porcelain command to display only a few lines

Environment

a364a84 (grafted, HEAD -> main, origin/main, origin/HEAD) Reduce number of files listed for `source` or `.`

pc linux-gnu /usr/bin/zsh -zsh zsh-5.8-0-g77d203f

Steps to reproduce

  1. edit .zshrc ,mine looks like this
#-----zsh-autocomplete-----
zstyle ':autocomplete:*' list-lines 5
zstyle ':autocomplete:history-search:*' list-lines 5
zstyle ':autocomplete:history-incremental-search-*:*' list-lines 5
zstyle ':autocomplete:*' min-input 1
zstyle ':autocomplete:*' fzf-completion yes
source ~/.config/zsh/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh
  1. start typing any command.
  2. get this mess image image

Lite5h4dow avatar Nov 10 '21 22:11 Lite5h4dow

list-lines sets maximum number of lines to which to grow if not all the lines fit on screen. If more lines will fit on screen, then zsh-autocomplete will use them. If you want to see less, then just type a bit more; non-matching completions will be filtered out.

marlonrichert avatar Nov 11 '21 07:11 marlonrichert

yeah, but i dont want it to fill the whole window though if its clear, because I clear my window a lot how do i get it to not fill the whole window?

Lite5h4dow avatar Nov 11 '21 07:11 Lite5h4dow

if this isn't possible I will just uninstall it and leave you alone.

Lite5h4dow avatar Nov 11 '21 08:11 Lite5h4dow

how do i get it to not fill the whole window?

Like I said, by typing more.

Why is this so important? It won't stay there; it will go when you continue to type or execute your command line.

if this isn't possible I will just uninstall it and leave you alone.

Of course it's possible. You just have to implement it. Patches welcome. 🙂

marlonrichert avatar Nov 11 '21 20:11 marlonrichert

basically, I don't like a lot of things in my terminal. the only things I let fill the screen are logs or files I'm editing. that's about it.

why is this so important?

I don't like a full terminal in any way. I don't like useless information since the vast majority of suggestions arent useful. I don't like clutter.

it wont stay there

I'm fully aware but its a large distraction while I'm typing if I know what I'm typing already and its not like I want nothing there, just don't want the screen full of stuff.

Lite5h4dow avatar Nov 12 '21 09:11 Lite5h4dow

Not planning to implement this any time soon.

marlonrichert avatar Feb 27 '23 13:02 marlonrichert

Just thought I would chime in that I agree with @Lite5h4dow on this one. I would have thought that the "all" line limit setting would actually apply to all autocomplete types. It feels weird that this isn't included.

It's jarring that my window gets cleared whenever I type a git command. Unfortunately it's enough of an annoyance that I'll be disabling the plugin.

yesthisisjoe avatar Apr 25 '23 17:04 yesthisisjoe

I can see your point. I'll reopen this, but I don't really have time to implement it any time soon. Pull requests welcome! 🙂

marlonrichert avatar Apr 26 '23 12:04 marlonrichert