Hi,
I wrote this today, finally.
It's a wrapper for 'tmsu files' which remembers your query results for N minutes (default 30), and returns them quickly when you ask for them the second,..Nth time.
Example usage is just like `tmsu files`:
`tmsq banana not apple`
and supports all `tmsu files` options as well as the overall tmsu options TMSU_DB, -D/--database, -v/--verbose, and a few others -- --clean-cache, --list-cached and -o/--cache-timeout
Mostly useful for queries that take a while to execute (eg. complex queries, or queries with large numbers of results) and do not need to be up-to-the-second accurate. If you have a small database, you probably won't gain much from this.
I wrote it because my database is large enough that some queries take 20 - 149 seconds, whereas returning the cached results takes 0.1-0.3 seconds.
Known issues:
* Commandline help doesn't indicate the remaining arguments (ones that will be passed to 'tmsu files')
* bad arguments (eg --some-nonsense-option) get treated as part of the 'tmsu files' arguments.
Not really avoidable, just something to be aware of.
In this case tmsu files should return no files and you just get an empty cache entry.
* No Zsh completion. Would be a fairly simple modification of the 'tmsu files' completion code included as part of the TMSU distribution, once I understand how that works.
* It may be worthwhile to take over the -c/--count option to tmsu files -- certainly significantly faster than treating --count and non --count as different queries. Maybe the same holds true for -0.
For now, it's hosted on bpaste. If anyone aside from me finds it useful, I'll put it up on gitorious.
Enjoy.