aiocoap icon indicating copy to clipboard operation
aiocoap copied to clipboard

aiocoap-client interactive mode: focus, usability

Open chrysn opened this issue 4 years ago • 1 comments

Seeing how often coap-shell is recommended these days, I think there are improvements to the already existing --interactive mode of aiocoap-client that it can benefit from:

  • Allow prefixing things with get, post, put etc. The current command line processing is "just like aiocoap without the command name", which is kind of OK but also unusual compared with common interactive tools.

    Proposed change: Have an implicit -m in the front if the first word is get, put or another method in any capitalization.

  • Have a concept of the current URI. Running any command sets that to what was requested (or the Location if one was returned, with appropriate debug output).

    The URL argument is, when such a current point is available, relative to there. When a relative reference is used, it should be printed in full before executing the request.

  • Adding something cd-ish (possibly "goto"?) might be a suitable addition -- change the current value but don't do anything with it; could also become the default in an incompatible change (then you could just enter .. and in the next line get).

  • When dissecting anything with links, these could receive annotations in pretty-printing that allow going there easily (like [1] </resource-lookup/>;rt="...", [2]</endpoint-lookup/>...) ... or these could be shown like footnotes in the end.

Not sure all of these are a good idea, feedback would be appreciated.

chrysn avatar Apr 28 '21 11:04 chrysn

Some input on this is captured in a RIOT forum thread, especially from @mcr.

chrysn avatar Sep 30 '21 16:09 chrysn