Skip to content

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

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

alexandre-abrioux
Copy link
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
4 checks passed
@Saghen
Copy link
Owner

Saghen commented Apr 25, 2025

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