Add bash autocompletion support for utimer#8
Merged
Conversation
- Add bash completion script with support for all CLI options - Complete long options (--timer, --countdown, --stopwatch, --clock, etc.) - Complete short options (-t, -c, -s, -k, etc.) - Suggest common time patterns for timer/countdown options - Integrate completion into autotools build system - Add PKG_CHECK_MODULES for bash-completion detection - Install completion script as 'utimer' for proper auto-loading - Support both modern (/usr/share/bash-completion/completions/) and legacy (/etc/bash_completion.d/) installation paths Fixes #5
Document bash completion support added in this PR (#5)
… suggestions - Add --milliseconds/-m to available options list - Improve completion logic to suggest -m after --clock is used - Ensure completion script works with both autocompletion and clock features
- Fixes make check failure in completion directory - Adds compatibility with Makefile.decl test target requirement - All tests still pass (9/9), now CI build completes successfully
…project conventions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add bash autocompletion support for utimer
Summary
Implements bash tab-completion for utimer command-line interface, addressing issue #5.
Features Added
--timer,--countdown,--stopwatch,--clock,--verbose,--quiet,--quit-with-success,--limits,--version,--help,--debug)-t,-c,-s,-k,-v,-q,-L,-d,-h)--timerand--countdownoptions, suggests common patterns (1s,5s,10s,30s,1m,2m,5m,10m,30m,1h,2h)/usr/share/bash-completion/completions/) and legacy (/etc/bash_completion.d/) pathsImplementation Details
pkg-configto detect system bash-completion directoryutimer(matching command name) for auto-loadingTesting
Files Changed
configure.ac: Added bash-completion detection via PKG_CHECK_MODULESMakefile.am: Added completion subdirectory to buildcompletion/Makefile.am: Installation logic for completion scriptcompletion/utimer-completion.bash: The bash completion implementationUsage Example
After installation:
Fixes #5