Conversation
New command: search (alias: s) obsidian-cli search [tag] [options] Output formats (--format, -f): names - Just filenames (deduplicated) locations - Filename:line_number (default) lines - Full line content with context blocks - Paragraph/block until empty line Features: - Support inline #tags and frontmatter tags - Support nested tags (programming/philosophy, programming/a/b/c) - Support hyphens and underscores (learning-strategy, dist_sys) - --subtags (-s): include child tags when searching parent - --location (-l): filter by frontmatter/inline/all - --context (-c): lines around match (for lines/blocks format) - --editor (-e): open in editor Block vs Line distinction: - Line: single line ending with newline - Block: contiguous text until empty line (paragraph) Robustness: - Excludes markdown headers, hex codes, code blocks - Excludes numeric-only tags - Comprehensive test coverage (27+ tests) Examples: obsidian-cli search programming obsidian-cli search programming -f names -s obsidian-cli search daily -f blocks -c 2 obsidian-cli search work -s -l frontmatter
Owner
|
Thank you for the PR, I will take a look soon! |
Owner
|
Hey are your changes to completely remove the existing search functionality intentional? Happy to add a tag command but I don't want to remove existing functionality. There are also conflicts, can you please take a look @Sean-Shmulevich? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New command: search (alias: s)
obsidian-cli search [tag] [options]
Output formats (--format, -f):
names - Just filenames (deduplicated)
locations - Filename:line_number (default)
lines - Full line content with context
blocks - Paragraph/block until empty line
Features:
Block vs Line distinction:
Robustness:
Examples:
obsidian-cli search programming obsidian-cli search programming -f names -s obsidian-cli search daily -f blocks -c 2 obsidian-cli search work -s -l frontmatter
Pull Request Title
Description
Motivation and Context
Checklist: