Skip to content

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