Mg_client usability

Hi!

I’ve had a couple of days using MemGraph and noticed a couple of mg_client quirks I thought it worth mentioning

  • It seems to have no “readline” capability, so the up-arrow does not take you to the previous command. This makes life difficult for fat-fingered chaps like me who are forever misspelling things. I appreciate that you’d want to avoid Gnu Readline, since GPLv3, but there are several others out there
  • It seems you are “rolling your own” options parser, at least it behaves in an unusual manner. For almost very command-line tool out there, -c foo, --command foo and --command=foo are the same thing. For mg_client, the --use-ssl false option does not set SSL false (and gives no warning), one must use --use-ssl=false. It took me an hour of head-scratching and running the thing under strace to work this out.

Cheers!

Jim

3 Likes

Hi Jim!

Again, very good points. The first problem is I think easy to solve. Take a look under https://github.com/memgraph/mgconsole. It’s under GPLv3 and uses libreadline for the command history. It still has the flag problem, but that should be fine. We’ll probably, at some point, implement the console with some higher-level language/tool so that the user gets more out of the box. Sorry for spending that much time. From my standpoint, the least we can do is to put a note about the behavior.

Thank you!