Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

on-site/db2c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a db2 console with with history and autocomplete support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages