Skip to content

search does not pass arguments that start with a dash to plugins #808

Done

Description

@linghengqian

vfox search <plugin> <arguments> parses its arguments as flags, so an argument that starts with a dash is rejected before the plugin's Available hook runs. The vfox-clang README documents vfox search clang --no-cache, which fails on vfox 1.1.0:

$ vfox search clang --no-cache
Incorrect Usage: flag provided but not defined: -no-cache
$ echo $?
1

With -- in front of the argument, it reaches the plugin: vfox search clang -- --no-cache.

cmd/commands/search.go does not set SkipFlagParsing, so unknown flags after the plugin name are an error. Positional arguments do reach the plugin (vfox search java tem), which is why the flag case stands out.

Expected: the arguments after the plugin name are passed to the plugin. If the flag parsing is meant to stay, the documentation should say that -- is needed.

Checked with vfox 1.1.0 on Linux, and the same search command on main (69da1ba).

Activity

  1. added
    bug
    help wanted
    on Nov 21, 2026
  2. mateuscmtropical commented on Nov 21, 2026

    @mateuscmtropical
    Contributor

    Hi, I'd like to work on this one.

  3. removed
    help wanted
    on Nov 21, 2026
  4. linghengqian commented on Nov 21, 2026

    @linghengqian
    MemberAuthor

    @mateuscmtropical Welcome to open a PR.

  5. added this to the 1.1.1 milestone on Nov 21, 2026
  6. mateuscmtropical commented on Nov 21, 2026

    @mateuscmtropical
    Contributor

    Hi, I've opened a PR for this: #813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions