Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh dynamic completions report not enough arguments #5856

Open
2 tasks
Eh2406 opened this issue Dec 23, 2024 · 4 comments
Open
2 tasks

zsh dynamic completions report not enough arguments #5856

Eh2406 opened this issue Dec 23, 2024 · 4 comments
Labels
A-completion Area: completion generator C-bug Category: bug E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@Eh2406
Copy link

Eh2406 commented Dec 23, 2024

Please complete the following tasks

Rust Version

rustc 1.83.0 (90b35a623 2024-11-26)

Clap Version

4.5.20

Minimal reproducible code

check out https://github.com/pubgrub-rs/semver-pubgrub. Given the weird set up I have in this repository in error might be the correct response. I do not have an examples in the examples folder, I have a whole separate project.

Steps to reproduce the bug with the above code

In zsh Try to completing cargo r --example=

Actual Behaviour

I get

_values:compvalues:11: not enough arguments
_values:compvalues:11: not enough arguments
_values:compvalues:11: not enough arguments
_values:compvalues:11: not enough arguments

and my terminal moves on to the next line.

Expected Behaviour

an error, or no suggestion, or 🤷‍♂️

Additional Context

Ed asked me to move this bug here. I did not follow all instructions for bug reports to this repo, sorry.

Debug Output

No response

@Eh2406 Eh2406 added the C-bug Category: bug label Dec 23, 2024
@epage epage added E-medium Call for participation: Experience needed to fix: Medium / intermediate A-completion Area: completion generator labels Dec 24, 2024
@epage
Copy link
Member

epage commented Dec 24, 2024

Hmm, tried to create a test case for this but couldn't reproduce it (#5857). This might require digging into manually.

For completeness, what is your version of zsh? Are you using any other addons like omg-zsh or whatever its called?

@Eh2406
Copy link
Author

Eh2406 commented Dec 24, 2024

% zsh --version 
zsh 5.8.1 (x86_64-koji-linux-gnu)

and I do not have a plugins section in my .zshrc file.
Happy to hop on a call to figure out what's weird about my system.

@epage epage changed the title odd issue when using completions zsh dynamic completions report not enough arguments Feb 13, 2025
@epage
Copy link
Member

epage commented Feb 18, 2025

I cloned semver-pubgrub and ran cargo r --example=[TAB] and got back no responses

$ zsh --version
zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

My zsh was generated from a system default

# Set up the prompt

autoload -Uz promptinit
promptinit
prompt adam1

setopt histignorealldups sharehistory

# Use emacs keybindings even if our EDITOR is set to vi
bindkey -e

# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history

# Use modern completion system
autoload -Uz compinit
compinit

zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true

zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'

@epage
Copy link
Member

epage commented Feb 18, 2025

btw cargo r [TAB] won't work atm because we've not yet implemented support for built-in aliases to be completed, let along completing arguments passed to them.

Granted, the message still shouldn't show up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion Area: completion generator C-bug Category: bug E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

2 participants