Skip to content
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

note.ignore option does not ignore subdirectories #173

Closed
j-hui opened this issue Feb 22, 2022 · 6 comments · Fixed by #195
Closed

note.ignore option does not ignore subdirectories #173

j-hui opened this issue Feb 22, 2022 · 6 comments · Fixed by #195
Labels
enhancement New feature or request

Comments

@j-hui
Copy link

j-hui commented Feb 22, 2022

I seem to be unable to ignore all subdirectories under a path. Steps to reproduce:

$ zk init --no-input
...
$ edit .zk/config.toml
...
$ cat .zk/config.toml
[note]
template = "default.md"
ignore = [
  "drafts/**",
  "log.md"
]
[format.markdown]
link-format = "wiki"
hashtags = true
colon-tags = false
multiword-tags = false
[lsp]
[lsp.diagnostics]
dead-link = "error"
$ mkdir -p drafts/subdir
$ echo "# This is not ignored" > not-ignored.md
$ echo "# This is ignored" > drafts/ignored.md
$ echo "# This should be ignored but isn't" > drafts/subdir/should-ignore.md
$ zk list
This is not ignored not-ignored.md (1 minute ago)


This should be ignored but isn't drafts/subdir/should-ignore.md (just now)



Found 2 notes

This also doesn't work with drafts/*. It sort of works with drafts/*/* but then drafts/ignored.md is not ignored.

@mickael-menu
Copy link
Member

This is the default behavior of Go's globbing, but I agree it's not great. I'll take a look if it can be improved.

@mickael-menu
Copy link
Member

It's now available in main, I used a third-party lib to support the double star globbing.

@trev-dev
Copy link

trev-dev commented Dec 9, 2022

The double globbing is not working recursive for me, currently using "zk dev" on nixos.

@mickael-menu
Copy link
Member

@trev-dev Could you share a minimal reproducible example on how it fails? I'll check with the latest zk version to rule out an issue in it.

@trev-dev
Copy link

@mickael-menu I am not sure what changed on my end but I can no longer reproduce the issue myself. I will return here if I can

@trev-dev
Copy link

@mickael-menu Actually, I do know what changed. I use nixos and my config is symlinked by the build daemon 🙄 I must have forgotten to rebuild my home env but I have re-built since I originally commented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants