zsh autocompletion loses track of TMSU_DB in single-line case

Issue #55 resolved
created an issue

That is, when you type TMSU_DB=/tmp/foo.db tmsu tag bar and hit <TAB>, autocomplete looks at the list of tags from the old db, not the one from /tmp/foo.db

I understand why this occurs (TMSU_DB is not yet set, from the point of view of the autocompleter. It's the same thing that causes FOO=BAR echo $FOO to output just a blank line.). However this makes working with multiple DBs somewhat awkward.

Ideally, the 'tmsu' command would also accept a manual override parameter before any subcommands, as in tmsu --db=/tmp/foo.db tag bar; this would allow the autocompletion to successfully detect the correct DB to use, and also seems more unix-idiomatic.

Comments (3)

  1. Paul Ruane repo owner

    This is implemented on tip. There is a --database global option with which you can specify which database file to use. I've also managed coax the Zsh completion to honour this when specified earlier on the command-line.

  2. Log in to comment