Skip to content

Make idx search relative to cwd #18475

Closed

Description

@yerlaser

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

First of all, thanks a lot to everyone involved in introducing the new idx family of commands.
Searching has become really instantaneous and I am looking forward to using it in place of fd/rg.

One thing that bothers me currently is that idx search gives results from and relative to the location of the last idx init and not from the current path.
This limits it's effectiveness because one now needs to re-init every nested folder even if the parent was already init.
More important though it's confusing because the path is relative to the init folder which is not obvious from the output and not easy to filter/fix.

Suggestion, make idx search filter out results that are beyond cwd and possibly introduce a new key --workspace which will search in the init folder as now but make all the path relative to cwd

How to reproduce

  1. Run idx init . in a folder that has subfolders
  2. Change dir to a nested folder
  3. Run idx search something

Expected behavior

Either only results from current and descendant folders should be included (preferred) or the paths should be relative to cwd

Configuration

compiled from source

Activity

  1. added
    status:needs-triage
    on Jun 26, 2026
  2. fdncred commented on Jun 26, 2026

    @fdncred
    Contributor

    seems reasonable

  3. fdncred commented on Jun 26, 2026

    @fdncred
    Contributor

    Hopefully this works as expected #18477

  4. added this to the v0.114.0 milestone on Jun 26, 2026
  5. yerlaser commented on Jun 26, 2026

    @yerlaser
    Author

    Great, thank you very much for quick resolution!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions