reesmichael1 · GitHub

In timeclock files, to disambiguate the account from the description, we require two spaces between the account name and the description. This works well when both of those entries are present, but following #2362, I'd like to propose allowing timeclock comments to appear directly after the account name (i.e., without a description) with only a single space.

The current behavior is slightly more of a problem now that the account name on a clock-out has to match a previous clock-in. For example, I think this is a natural way for the uninitiated to write a timeclock file:

i 2025-06-01 10:00:00 Projects:OSS:hledger ; feature:X
o 2025-06-01 12:00:00 Projects:OSS:hledger ; take break for lunch

In previous versions, this would parse but the account name would be Projects:OSS:hledger ; feature:X--annoying, but easy to see how to fix. Post #2362, this doesn't parse anymore with

hledger: Error: /home/michael/test.timeclock:2:1:
2 | o 2025-06-01 11:00:00 Projects:OSS:hledger ; take break for lunch
  | ^
Could not find previous clockin to match this clockout.

This is technically the expected behavior, but I think it's a sharp edge we can soften. Note also that the current behavior introduces an easy-to-miss gotcha where, even in 1.32 where this parses successfully, the tag feature:X can't be used in any queries.

If this is agreeable, I'm happy to implement this myself.

Read the original on github.com ↗