Add command to echo database version and file path #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #32.
The final interface is slightly different than what was suggested in the related issue. I can't recall my exact reasoning (I implemented that a long time ago; it was waiting for me to finally push it to the repo since then), but it seems to be subjectively more concise and simple than the alternatives. It also works better with the fact that printing the version requires a master key, and printing the file path alone does not—the latter is the default action because of that fact. It also works on the assumption that if someone really needs only the version, they can always pipe the output into something like
| cut -d'(' -f2 | sed 's/)//'
.I think I wasn't a fan of
db version
because it's inconsistent withotp --version
, which I plan to introduce at some point. I'm not a fan ofotp version
, as--version
seems to be preferred in the classic CLIs, and I personally always default to using--version
or-v
when trying to fetch a version of any tool. That's opinionated, obviously, but the whole point ofonetimepass
is to be the most comfortable 2FA client for me, primarily, and then for any other potential users.I guess this is also the PR that begins an experiment to gravitate away from naming PRs and commits with nothing more than
Fix #xy
. We'll see how it works.