For many years I was using tcsh, with lots of useful customizations, that were created during these years. Now I have bash on my laptop and slowly adding what I’ve got used to.
Yesterday I’ve created command line completion rules for mysql-test-run. It’s not a complete set of everything that’s possible, still it’s quite useful as it is. I need to type much less now when invoking mysql-test-run (and I invoke it quite a lot).
I don’t know about you, but I like diff -p . Having used it for years, I can read these diffs like a text, while diffs without -p often need to have the original file opened side by side, just to get enough of the context.
Loving diff -p so much, I want to see it everywhere (evil laughter). Alas, in bzr only diff command can easily use -p, just run it as
bzr diff --diff-options=-p or store it as an alias in the
Actually, for an alias there is a better, although more verbose, alternative:
diff = "diff --diff-options='-F ^[[:alpha:]$_].*[^:]$'"
Unlike simple -p it will not think that a word ending with a semicolon (like a label or, say,
private:) is a “C function name”.
But the problem is — only
bzr diff can be tuned this way. Bzr email plugin still sends diffs without function names. And
bzr gdiff does not show them. And, of course, all other bzr commands —
bzr commit, for example, or
bzr unshelve --preview,
bzr log --show-diff and others — they are still as unfriendly as before.
I was solving it on a case by case basis — added a
post_commit_diffoptions configuration option to the bzr-email plugin, then a command line option to
bzr gdiff. But then it occurred to me that I can attack the problem at its core!
If you want to know more about MySQL and MariaDB plugins read below. Our (Andrew Hutchings and mine) book MySQL 5.1 Plugins Development was just published by Packt. As far as I know it’s the first and the only book completely dedicated to MySQL Plugin API. It covers all existing in 5.1 plugin types, from Daemon to Storage Engines, and does not shun from explaining less known or poorly understood features of the plugin API. It describes newer plugin API extensions too – such as authentication plugins and recent CREATE TABLE extension. Also there is one chapter dedicated to UDFs.
This a “learning by example” style book, very different from the reference manual style. It is written around 23 fully working and thoroughly explained plugins example – simple demos as well as practically useful ones. My personal favorites are
- getrusage daemon plugin
- condition pushdown I_S plugin
- exif full-text parser
- Tocab storage engine (with b-tree indexes!)
- USB authentication plugin
See the complete list in the table of contents.
What others think: