todoman icon indicating copy to clipboard operation
todoman copied to clipboard

zsh completion fails if jq is not installed

Open triallax opened this issue 2 years ago • 3 comments

% todo cancel <TAB>
__todo_tasks:[:4: unknown condition: -lt
__todo_tasks:12: command not found: jq
Error: No configuration file found.


For details on the configuration format and a sample file, see
https://todoman.rtfd.org/en/latest/configure.html

(The "Error: No configuration file found." thing is probably because I don't actually have Todoman set up.)

<TAB> here means pressing the tab button. Also, to be clear, todo <TAB> shows the available subcommands just fine.

zsh version is 5.8.1, Todoman is 4.1.0 installed from Homebrew.

triallax avatar Sep 14 '22 18:09 triallax

Please report this to homebrew, they should list jq as an (optional?) dependency.

I guess the autocomplete could fall back gracefully is jq is absent tho.

WhyNotHugo avatar Nov 03 '22 19:11 WhyNotHugo

Documented in https://github.com/pimutils/todoman/commit/aa738c64fd393289b796f48ab6a2b02b3e13b286

cc: @pimutils/packaging jq is necessary for auto-complete. For platforms where zsh is the default shell, I suggest adding it as a dependency, for others adding it as an optional dependency should suffice.

WhyNotHugo avatar Nov 03 '22 20:11 WhyNotHugo

Please report this to homebrew, they should list jq as an (optional?) dependency.

I already added jq as a dependency in Homebrew/homebrew-core#110702 (homebrew-core does not allow optional dependencies).

I guess the autocomplete could fall back gracefully is jq is absent tho.

Yeah, that was what I intended to say.

triallax avatar Nov 04 '22 09:11 triallax