Over a million developers have joined DZone.

Readline for NuoManager

DZone's Guide to

Readline for NuoManager

· Database Zone
Free Resource

Learn how to move from MongoDB to Couchbase Server for consistent high performance in distributed environments at any scale.

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!

Want to deliver a whole new level of customer experience? Learn how to make your move from MongoDB to Couchbase Server.


Published at DZone with permission of Seth Proctor, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


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

{{ parent.tldr }}

{{ parent.urlSource.name }}