Closed ozbillwang closed 7 years ago
and can we have auto-version
(-a option) as default option?
This also looks weird.
$ credstash list
my-github-password -- version 0000000000000000001
my-github-password -- version 0000000000000000003 # run with -a
my-github-password -- version 2 # run with -v 2
The DDB field that holds the item version is a string. This is great, because it means you can chose whatever versioning scheme you want. So, if you want to use natural numbers, you can, but you can also have versions like 2016-01-01
. The downside to storing versions as strings is it means that the sort order goes to pot when you get past 9 versions of a key. The lexicographic sort order of 11 key versions might be:
foo - 1
foo - 10
foo - 11
foo - 2
foo - 3
... etc
So, we left-pad the version if you use -a
. If you want to chose some other versioning scheme, you do that instead.
-f
for file sounds like a totally reasonable thing to do. We need to keep @
as well, so as to not break anyone who has written automation with it. We should figure out how to cope with values that start with @
.
Seems -f
has been used as --format
, to avoid inconsistently, I think this feature is not required anymore.
-f {json,yaml,csv}, --format {json,yaml,csv}
I knew @ can be used to input the file as value. But it looks weird.
And how to deal with a value start with
@
Can we have an option such as
-f
, so we can input the file as: