Configuration / preferences #158
Replies: 4 comments 2 replies
-
One suggestion if this is implemented: please use |
Beta Was this translation helpful? Give feedback.
-
As someone who prefers the numbers to be rounded, I'm very much in favor of this. Env vars or config files doesn't matter. Why not both? Philosophy of keeping it opinionated? Let me know if you'd like me to help out. |
Beta Was this translation helpful? Give feedback.
-
Default should-total would be valuable, as well. |
Beta Was this translation helpful? Give feedback.
-
In case anyone is eager to try this out, I have added basic support for a file-based config via #249. That would require building klog from sources, though. See https://klog.jotaen.net/#get-klog for instructions. |
Beta Was this translation helpful? Give feedback.
-
For the manipulation commands, there currently is no explicit way to specify personal preferences regarding the formatting (e.g.
14:00
vs2:00pm
, or2000-01-01
vs.2000/01/01
). The only mechanism that there is, is the automatic style detection. That only works for specific use cases, though.For features like the rounding (
--round
flag), it would probably be good to persist the setting, so that you don’t have to spell out the flag on every invocation ofklog start
orklog stop
.One way of doing this is via environment variables, e.g.
KLOG_ROUNDING=5m
. The downside is that this only works when the CLI tool is used in a login shell, so it’s environment-dependent.Another option would be a config file, e.g.
~/.klog/config.toml
. In order to make that more discoverable (and easier to work with), aklog config
command could print out the current settings. Potential candidates for additional parameters:-
or/
delimiter)\t
)klog start
,klog stop
, etc.)klog create
)Beta Was this translation helpful? Give feedback.
All reactions