Repository navigation
Conversation
Every snippet selector now falls back to folder/title, split at the last slash, after package paths, UUID prefixes, and exact titles. This is the spelling `snip edit --create` files a new snippet under, so `snip work/notes` reads back what `snip edit work/notes --create` made. A title that itself contains a slash still wins, and a missing folder/title stays a hintless not_found so --create keeps working. Also correct snip-query(1), which still called ambiguous titles conflicts.
`snip create` and `snip edit --create` now print created:, `snip restore` prints restored:, and only real edits print updated:. `snip edit --create` also reports created: instead of unchanged: when the editor saves nothing, since the new snippet exists either way. JSON output is unchanged.
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.
Follow-ups from testing the 0.6.4 cheat-style lookup work.
Folder/title selectors
snip edit scratch/notes --createfiles a snippet underscratchand finds it again on the next run, butsnip scratch/notesandsnip show scratch/notesreported not found.Library::resolve_snippetnow falls back tofolder/title, split at the last slash, after package path, UUID prefix, and exact title:--createstill creates.The selector help text, the agent skill, and
snip-query(1)document the new form.snip-query(1)also still called ambiguous titles "conflicts", which the 0.6.4 docs fix missed.Mutation output
print_mutationhardcodedupdated:, including forsnip createandsnip restore. It now takes the action:snip create/snip edit --create(new)created:snip restorerestored:updated:snip edit --createalso printedunchanged: <id>when the editor saved nothing, although the new snippet exists. It now printscreated:. JSON output is unchanged.Verification
cargo fmt --check, both clippy configs with-D warnings, and the three generator--checks pass.cargo test --all-targets: 537 passed, 0 failed.show Two/Duplicateand the created/updated/restored labels.snip work/notes, andshow deep/nested/thing.