rlwrap is useful for dbxml shell
652142Jan 16 2009 — edited Jan 16 2009I didn't know about this until recently. Using dbxml has been
painful. I fire it up and have to enter 3 or 4 commands before I can test
out a query, and typing in the query over and over again is an issue too.
I use history command line editing. That sort of editing is available
to any program, like dbxml. I believe I saw this in the dbxml documentation.
Anyway, consider:
-----
/usr/bin/rlwrap -m -c -H ~/.rlhistory -l ~/dbxml.log -r -m -P 'openC customer.dbxml \ adda L \ setN "test" "http://mytest.com/"' /usr/local/bin/dbxml -h ~/sn/db
-----
-m enables multiline newline escapes (more later)
-H means 'save the commands I do in dbxml in my home directory file .rlhistory'
-l means 'all input and output I do in dbxml is logged in my home directory, file name dbxml.log'
-P means 'before I enter my first dbxml command, pre-enter these commands. The space-backslash-space indicate that is where
newlines will appear (enabled by the previous -m command). So, in this example, I open a container, add an alias, and set a namespace before I enter my first dbxml command.'
/usr/local/bin/dbxml is where my executable copy of dbxml is.
-h ~/sn/db is an argument to dbxml.
Anyway, I have found this very helpful to be able to prerun
commands and get command history in dbxml. I'm sure I was the last
to find out :-)
-g