Replace pos?/zero? checks with exact version comparison against a
search-db-version constant. Bumping the constant will auto-trigger
rebuilds when the index format changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reject missing or unsupported shell arguments (e.g. "fish") at parse time
with a clear error message, rather than letting it fail deep in the generator.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded --name/--sort context branches with auto-detected varied
option keys (find-varied-option-keys), so --type and any future options with
differing completions across commands are handled automatically. Fix zsh
generator to skip group root entries from leaf function emission, avoiding
duplicate function definitions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Also fix zsh eval support by replacing `_logseq "$@"` with
`compdef _logseq logseq` so `eval "$(logseq completion zsh)"`
works in ~/.zshrc without the "_arguments: can only be called
from completion function" error.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Introduced `completions_test.cljs` to validate the structure and behavior of the completions command registration and argument parsing.
- Added `completion_generator_test.cljs` to extensively test the completion generator, including spec metadata validation, Zsh and Bash output generation, and end-to-end checks for command entries and structural markers.
Invalid graphs were pretending to be valid. Instead
validation errors should be displayed and command should
exit 1. This also fixes other commands that were exiting 0
even though they returned an :error
Repo refers to internal identifiers that start with 'logseq_db_' and
used to start with 'logseq_local_'. The --repo option was not being
used in that way and was just a reference to a graph name. While it's
reasonable for internal CLIs like db-worker-node.js to use --repo, it is
needlessly confusing to introduce repo to users. Almost all of our apps and docs
label graphs as 'graph' and not 'repo'
--output was being used as a global and command option. This resulted in
buggy, coupled behavior e.g. unable to set a global output unless the
export file was named human, edn or json. `--ouput` was also
not listed as a command option which was confusing. Renamed the command
--ouput to --file for explicit and uncoupled behavior