Project

db2c

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
a db2 console with with history and autocomplete support, and few other goodies
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

DB2 console with history, autocomplete support and few other goodies

DB2 console mode does not support readline and autocomplete, this is a wrapper for the db2 command mode that adds support for both. It also tries to make using db2 a little bit more tolerable, adding support for interactive editing and psql-like meta commands and other shortcuts.

Install

apt-get install rlwrap
gem install db2c

Examples

db2 => use testdb
db2(testdb) => current date
db2(testdb) => -107
db2(testdb) => history
db2(testdb) => select * from table.with.many.columns | less -S
db2(testdb) => edit
db2(testdb) => ls ~
db2(testdb) => irb
db2(testdb) => \l
db2(testdb) => \lt schema
db2(testdb) => \dv | grep -v SYS
db2(testdb) => \d schema.table
db2(testdb) => help

Acknowledgement

  • Chris Jester-Young (CKY) found out the problem of using shell metacharacters when executing commands from Ruby.
  • The initial script was inspired by defunkt's repl, for a genenral purpose repl/wrapper, this is your friend.
  • Ben Ellis (benissimo) did all the beta testing

See