Repository navigation
Version 0.2.1 is a smaller update bringing few quality-of-life improvements, a fully rewritten autocomplete system, two new commands, and a solid round of bug fixes.
Changes made:
New commands
country- changes the country used as the source of public holidays. Days that have already been manually edited by the user are left untouched where unmodified days are updated to reflect the new country's holiday calendar.files- displays the path to the directory where the application stores its data files, config, and other files.
Command changes
- Modified
calendarcommand - accepts a new optional argument that, when provided, displays a legend explaining the meaning of each color used in the calendar. - Modified
helpcommand - now alongside other information displays the shortest valid invocation string for the queried command.
Improvements
- Rewritten autocomplete system - the prediction and autocomplete mechanism has been fully redesigned from scratch. The system now suggests command names, macros, aliases, keywords, command abbreviations, command and macro arguments, and example values for individual arguments.
- Pressing the down arrow lists all suggestions - pressing the down arrow key when the input is empty now immediately shows all available completions without requiring any characters to be typed first.
- More detailed
infooutput for months - wheninfois called in a month context, it now separately reports the number of office days while present and the number of office days while absent, providing a more precise breakdown of attendance.
Bug fixes
- Command initialization was non-deterministic - the command initialization code relied on a set, which caused the
keycommand to sometimes fail to load entirely and not appear in suggestions or in thehelpcommand list. Fixed. - Crash when creating an alias with a quoted value - calling
alias name "value"caused a crash because quoted strings were being stripped of their delimiters during argument parsing, producing invalid input. Fixed. - Alias names with spaces were accepted - it is now enforced that alias names cannot contain spaces.
- Very long words broke frame borders - words that were too long to fit in one line would not break and caused display frames to overflow. That is no longer a case.
checkpointwas slow when listing known checkpoints - listing checkpoints was slow because file metadata (modification date, directory listing) was fetched from the filesystem multiple times. The number of calls was greatly reduced, making it significantly faster.configdid not display null fields - when a config field held anullvalue, attempting to display it caused the command to treat it as non-existent and return an error. It is now correctly shown with its null value.configcould not set a field to null - it is now possible to explicitly assignnullto a config field through theconfigcommand.- Incorrect error message when calling
exitwith dates - providing dates before theexitcommand produced an error claiming 0 arguments were received while 0 were expected, rather than correctly reporting that the command does not accept dates. Fixed. - Macros could silently overwrite other macros - a missing safeguard allowed saving a macro under a name 'macro' or 'deletemacro' without any warning. The necessary protection is now enforced.
Internal
- Rewrote
main.pyusingargparse- command-line argument handling has been migrated from manual parsing to the standardargparsemodule. - Added
__main__.py- the package can now be launched directly viapython -m <package_name>. - Rewritten config migration tests - the config migration test suite has been corrected and updated.
- Added E2E tests - a set of basic end-to-end tests has been added, covering the most fundamental application flows.