Skip to content

feat(source/path): ignore root slash - #1678

Merged
saghen merged 1 commit into
saghen:mainfrom
alexandre-abrioux:path-ignore-root-slash
Apr 25, 2025
Merged

saghen merged 1 commit into
saghen:mainfrom
alexandre-abrioux:path-ignore-root-slash

Conversation

@alexandre-abrioux

Copy link
Copy Markdown
Contributor

Context

When writing .gitignore files (or .dockerignore files, etc...), we can prepend the directories to ignore with a forward slash to only ignore the first level directory on a project, e.g.:

# Content of .gitignore
/dist/

This will ignore project_root/dist/, and won't ignore project_root/foo/dist/.

Issue

When writing such ignore rules, it is convenient to only autocomplete a list of directories in the current project. This is not possible currently with the path source, as using a forward slash autocompletes a list contained at the filesystem root path.

Proposal

I propose introducing a new option: ignore_root_slash, which would always look for directories in the current project, rather than listing directories in the file root path.

@saghen
saghen merged commit 5295e6a into saghen:main Apr 25, 2025
@saghen

saghen commented Apr 25, 2025

Copy link
Copy Markdown
Owner

Thank you!

@alexandre-abrioux
alexandre-abrioux deleted the path-ignore-root-slash branch April 25, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants