todo/provide machine readable (--json?) version of initremote --whatelseyohhttp://git-annex.branchable.com/todo/provide_machine_readable___40__--json__63____41___version_of_initremote_--whatelse/git-annexikiwiki2023-05-10T18:21:49Zcomment 1http://git-annex.branchable.com/todo/provide_machine_readable___40__--json__63____41___version_of_initremote_--whatelse/comment_1_5ed9864ef616d9e9b77a3d62561363fd/joey2020-06-17T01:18:32Z2020-02-17T16:06:26Z
<p>My design process for this feature included almost getting stuck on wanting
some kind of types for the values, and way to track which options are
required, or exclusive of other options, or dependencies of other options,
etc. All stuff that eg, an applicative option parser can support quite
well, but it would complicate the external protocol enourmously, if it
could be represented at all in it. So I had to eliminate all that.</p>
<p>I think it's fairly uncommon for tab completion to do anything special
about required parameters, or even mutually exclusive options (although
git-annex tab completion does handle the latter), and while I can imagine
a gui interface marking an input field as required, it seems
that would be the least of its problems if it doesn't know what kind of
control to use for the field?</p>
<p>It would be easy to add --whatelse-json, but it would be limited to the
name, a description of the purpose of the field, and maybe a description
of the expected value or list of valid values.
I'm unsure about the utility of that..</p>
comment 2http://git-annex.branchable.com/todo/provide_machine_readable___40__--json__63____41___version_of_initremote_--whatelse/comment_2_e9647b34aa79c414faf0f57ba17e6af4/joey2023-05-10T18:21:49Z2023-05-10T16:56:37Z
<p>I'm still not seeing much of an application for this, but since I've been
adding --json support to most git-annex commands anyway recently, and got
to initremote, I did go ahead and make --whatelse --json work.</p>
<p>Currently only the field name and description, and a description of the
allowed values are in there. It might be possible to add more information
like type or required or not, but I'd want to work with someone who was
consuming that information to do that.</p>