File tree 4 files changed +16
-1
lines changed
4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11
11
* The default value for ``path `` is now ``~/calendars/* ``. Previously this
12
12
value was required. This change is non-breaking; all existing valid
13
13
configurations define this value.
14
- * Add a new `columns ` option to enable column-aligned output.
14
+ * Add a new `columns ` option and configuration entry to enable column-aligned
15
+ output.
15
16
16
17
v4.5.0
17
18
------
Original file line number Diff line number Diff line change 1
1
# A glob expression which matches all directories relevant.
2
2
path = "~/my_calendars/*"
3
+ columns = "auto" # never (default) / always / auto
3
4
date_format = "%Y-%m-%d"
4
5
time_format = "%H:%M"
5
6
default_list = "Personal"
Original file line number Diff line number Diff line change @@ -375,6 +375,7 @@ def cli(
375
375
elif colour == "never" :
376
376
click_ctx .color = False
377
377
378
+ columns = columns or ctx .config ["columns" ]
378
379
if columns == "auto" :
379
380
ctx .columns = isinstance (sys .stdout , io .TextIOBase ) and sys .stdout .isatty ()
380
381
else :
Original file line number Diff line number Diff line change @@ -82,6 +82,18 @@ class ConfigEntry(NamedTuple):
82
82
By default todoman will disable colored output if stdout is not a TTY (value
83
83
``auto``). Set to ``never`` to disable colored output entirely, or ``always``
84
84
to enable it regardless. This can be overridden with the ``--color`` option.
85
+ """ ,
86
+ validate_color_config ,
87
+ ),
88
+ ConfigEntry (
89
+ "columns" ,
90
+ str ,
91
+ "auto" ,
92
+ """
93
+ By default todoman will disable column-aligned output entirely (value
94
+ `never`). Set to `auto` to enable column-aligned output if stdout is a TTY,
95
+ or `always` to enable it regardless. This can be overridden with the
96
+ ``--columns`` option.
85
97
""" ,
86
98
validate_color_config ,
87
99
),
You can’t perform that action at this time.
0 commit comments