Over a million developers have joined DZone.

Readline for NuoManager

DZone's Guide to

Readline for NuoManager

· Database Zone ·
Free Resource

MariaDB TX, proven in production and driven by the community, is a complete database solution for any and every enterprise — a modern database for modern applications.

You may already be familiar with a tool called rlwrap. If you aren't, you should check it out. It's a nifty tool. On Unix-like systems, it provides readline functionality for commands that lack it. 

Our nuodbmgr is one such command. If you spend any time managing NuoDB domains in an ad-hoc fashion and you're a fan of the command-line, then you can make your life a little easier and save yourself some keystrokes. First, installrlwrap either with your distribution's package manager, or from the source available at the above link. Next, create a file containing a completion word list:

administrator allowNonDurable apply archive capture categories config create database databases dbFile dbname domain echo graceful help host hostname hosts initialize license licenseFile log manage memory monitor name newHost options password pid process processes property quiesce remove restart set show shutdown sm start status summary targetVersion te trace unquiesce unset user value verify version

Feel free to edit this file however you like, for example, by adding your domain or database name to the list. Now, when you invoke the NuoDB Manager, prefix the command with rlwrap:

rlwrap -r -f ~/.manager-completions nuodbmgr --user domain --password mySecret --broker localhost

The -f option will pre-fill the in-memory completion word list with the words in the supplied file. The -r flag will cause any words that appear as input or output during your nuodbmgr session to be added to the in-memory list for use during that session. One caveat to note is that rlwrap is not context sensitive, so it's perfectly happy to suggest localhost as a NuoDB Manager command (which it is not). Happy hacking!

MariaDB AX is an open source database for modern analytics: distributed, columnar and easy to use.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}