@@ -1,6 +1,6 @@
2.0.0.dev0
- * #303: Add command-line flags for every borgmatic configuration option. See the
- documentation for more information:
+ * #303: Deprecate the "--override" flag in favor of direct command-line flags for every borgmatic
+ configuration option. See the documentation for more information:
https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#configuration-overrides
* #303: Add configuration options that serve as defaults for some (but not all) command-line
action flags. For example, each entry in "repositories:" now has an "encryption" option that
@@ -1,7 +1,7 @@
def variants(flag_name):
'''
- Given an flag name as a string, yield it and any variations that should be complete-able as
- well. For instance, for a string like "--foo[0].bar", yield "--foo[0].bar", "--foo[1].bar", ...,
+ Given a flag name as a string, yield it and any variations that should be complete-able as well.
+ For instance, for a string like "--foo[0].bar", yield "--foo[0].bar", "--foo[1].bar", ...,
"--foo[9].bar".
if '[0]' in flag_name:
@@ -0,0 +1,20 @@
+from borgmatic.commands.completion import flag as module
+
+def test_variants_passes_through_non_list_index_flag_name():
+ assert tuple(module.variants('foo')) == ('foo',)
+def test_variants_broadcasts_list_index_flag_name_with_a_range_of_indices():
+ assert tuple(module.variants('foo[0].bar')) == (
+ 'foo[0].bar',
+ 'foo[1].bar',
+ 'foo[2].bar',
+ 'foo[3].bar',
+ 'foo[4].bar',
+ 'foo[5].bar',
+ 'foo[6].bar',
+ 'foo[7].bar',
+ 'foo[8].bar',
+ 'foo[9].bar',
+ )