I use Codebook on iOS, for the same predominantly-unstructured-text reason. They’ve got a contact form – you should lobby them to do one for Android. Also it’s backed by SQLCipher, which is an encrypted extension of SQLite. It’s pretty straightforward to build from source.

I don’t think it would be that hard to write a command-line client that would open the database, prompt for your password, let you select an entry, plop that into $EDITOR, and then write the results back. But it would definitely be more than your little script. One benefit would be that it doesn’t decrypt the whole password file and leave it sitting in your filesystem – only the note you’re editing is exposed.

I do use KeePass, but haven’t transferred the majority of my secret data over to it because lots of my secret data seems to be unstructured text rather than username/password combos. Plus, darn-it-all, I really like being able to view it in my favourite text editor, complete with a decent search and the like.