(I haven't yet read the entire doc, I couldn't find anything relevant with ctrl+F, but I may as well missed a solution if it's already documented)
Hi! I'd like to exclude a directory from search inside a notebook. I tried to specify a path after --not operator but it apparently did nothing.
In regular search I solved the issue with a bash function that pipes results to grep (altho it's not ideal since I was at a loss how to grep for color escape codes so I used --no-color but now the results are less readable… because there is no color). But the problem appeared again when I tried to list the tags with nb --tags and realized I can't grep to exclude a path if it's not mentioned in the output.
My use case is: I wanted to setup archive directories inside non-archived notebooks. I know I could set up a separate archived notebook and sort archived items from other notebooks in separate directories, but I still want to keep notes on one topic in one notebook to keep the ability to search for all.
I wish I could exclude a directory from search either way (it might be already there but I simply missed it in the docs! or didn't figure out the syntax on my own), but another feature that would be interesting to me would be archiving directories inside non-archived notebooks with an .archived files in those folders.
I would also enjoy an option to override the .archived setting while doing a global search with --all.
PS. Unrelated to the ability to exclude folders in search I just figured out I can solve my issue around archiving files inside active folders by adding an #archived hashtag to notes and instead of piping my search to grep append --not -t archived arguments. Still don't know how to list tags with exclusion.
I am a beginner so I might still prefer a folder solution because it's easier to move files around in bulk than to manipulate them but maybe it's an excuse to get better at bash ;•)
(I haven't yet read the entire doc, I couldn't find anything relevant with ctrl+F, but I may as well missed a solution if it's already documented)
Hi! I'd like to exclude a directory from search inside a notebook. I tried to specify a path after
--notoperator but it apparently did nothing.In regular search I solved the issue with a bash function that pipes results to grep (altho it's not ideal since I was at a loss how to grep for color escape codes so I used
--no-colorbut now the results are less readable… because there is no color). But the problem appeared again when I tried to list the tags withnb --tagsand realized I can't grep to exclude a path if it's not mentioned in the output.My use case is: I wanted to setup archive directories inside non-archived notebooks. I know I could set up a separate archived notebook and sort archived items from other notebooks in separate directories, but I still want to keep notes on one topic in one notebook to keep the ability to search for all.
I wish I could exclude a directory from search either way (it might be already there but I simply missed it in the docs! or didn't figure out the syntax on my own), but another feature that would be interesting to me would be archiving directories inside non-archived notebooks with an
.archivedfiles in those folders.I would also enjoy an option to override the
.archivedsetting while doing a global search with--all.PS. Unrelated to the ability to exclude folders in search I just figured out I can solve my issue around archiving files inside active folders by adding an
#archivedhashtag to notes and instead of piping my search to grep append--not -t archivedarguments. Still don't know how to list tags with exclusion.I am a beginner so I might still prefer a folder solution because it's easier to move files around in bulk than to manipulate them but maybe it's an excuse to get better at bash ;•)