2009-05-31 (Sun)
mysqlでいちいちshow databasesとか打つのがめんどい→readlineのマクロで解決
MySQLでいちいちshow tables;とか打つのがだるい。\tみたいなalias設定できないのかなぁ
Twitter / weboo: MySQLでいちいちshow t
おぉ、readlineのマクロを使えばいいのかー
Twitter / weboo: おぉ、readlineのマク
なるほ!ってことでちょっと設定してみました。
# ~/.inputrc $if mysql "\C-xd": "show databases;" "\C-xt": "show tables;" "\C-xu": "select user,host,password from mysql.user order by user,host;" "\C-xb": "select user,host,db from mysql.db order by user,host;" "\C-xc": "show create table TN\\G" $endif
$if applicationでmysqlコマンドだけで有効になるように。
pgsqlチックに\tとか\dとかだと、readlineの行編集のbindと被りまくるのでC-xでprefixするような感じで定義してみた。
トラックバック - http://d.hatena.ne.jp/hirose31/20090531/1243777478
2003 | 11 | 12 |
2004 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 10 | 11 | 12 |
2005 | 01 | 02 | 03 | 05 | 08 | 09 | 10 | 11 | 12 |
2006 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2007 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2008 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2009 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2010 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2011 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 12 |
2012 | 01 | 02 | 03 |
2004 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 10 | 11 | 12 |
2005 | 01 | 02 | 03 | 05 | 08 | 09 | 10 | 11 | 12 |
2006 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2007 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2008 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2009 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2010 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2011 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 12 |
2012 | 01 | 02 | 03 |



