Bug
When using cljdx extract with a form name that contains ->, the shell interprets > as a stdout redirect, silently sending output to a file instead of stdout.
Example
# Broken — shell interprets -> as redirect; cljdx receives "date-str-" as the form name
# and stdout goes to a file named "nice-date-str"
cljdx extract src/pf/webapp/util.cljs date-str->nice-date-str
# error: no form with id 'date-str-'
# Fixed — quoting prevents shell expansion
cljdx extract src/pf/webapp/util.cljs 'date-str->nice-date-str'
Impact
The failure mode is confusing: the error message says the form doesn't exist (because cljdx only receives the truncated date-str-), when in fact the form is present and correctly indexed. The cljdx index subcommand is unaffected since it only takes a filename argument.
Suggestion
- Document the quoting requirement in
--help output and/or the README, e.g. "Form names containing -> or ! should be single-quoted to prevent shell interpretation."
- Optionally, detect when the supplied form id looks like a truncated symbol (no match but a match exists with a
-> prefix) and emit a hint.
Bug
When using
cljdx extractwith a form name that contains->, the shell interprets>as a stdout redirect, silently sending output to a file instead of stdout.Example
Impact
The failure mode is confusing: the error message says the form doesn't exist (because cljdx only receives the truncated
date-str-), when in fact the form is present and correctly indexed. Thecljdx indexsubcommand is unaffected since it only takes a filename argument.Suggestion
--helpoutput and/or the README, e.g. "Form names containing->or!should be single-quoted to prevent shell interpretation."->prefix) and emit a hint.