Fix completions to obey customized profile directories - #883
Conversation
Each subcommand and its corresponding options can be completed. This includes tuning profiles, but does not include devices, instances, or plugins. It took a while to figure out that `-A '-*'` is needed for the first invocation of `_arguments` to prevent collisions between the different levels of arguments. Signed-off-by: Speedy1894 <speedy1894@duck.com>
Instead of only the old directories, `/usr/lib/tuned/profiles,/etc/tuned/profiles`, use the `profile_dir` option in the configuration file (the default being the old constant value) or `/usr/lib/tuned,/etc/tuned` if on a version of `tuned` that doesn't support it. Fixes redhat-performance#881 Signed-off-by: Speedy1894 <speedy1894@duck.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds Zsh completion support for ChangesZsh completion support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The completion changes introduce no actionable merge-blocking risk based on the available evidence and are merge-ready after normal checks and review. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Developer
participant Zsh
participant TunedConfig
participant ProfileDirectories
Developer->>Zsh: request tuned completion
Zsh->>TunedConfig: read profile_dirs when supported
Zsh->>ProfileDirectories: list available profiles
ProfileDirectories-->>Zsh: return profile names
Zsh-->>Developer: show command and profile completions
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
(The completion-adding commit is here because that branch is a parent of this one — sorry if I should've put the second commit on top of it) |
Instead of only the old directories,
/usr/lib/tuned/profiles,/etc/tuned/profiles, use theprofile_diroption in the configuration file (the default being the old constant value) or/usr/lib/tuned,/etc/tunedif on a version oftunedthat doesn't support it.Fixes #881