Command help and tab completion for File Apps#10
Open
jnippula wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds NSH help output and readline tab-completion support for “file apps” (executables found via PATH) to match existing built-in app ergonomics.
Changes:
- Refactors built-in app help output to use a shared
help_namelist()formatter. - Adds PATH directory scanning to collect file app names for
helpand for readline completion. - Introduces a static, lazily-initialized completion cache for file apps and extends
nsh_extmatch_getname()to resolve those entries.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
255c747 to
24f860b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jari Nippula <jari.nippula@tii.ae>
24f860b to
483984a
Compare
Tab completion for file apps uses static cache populted once during first usage. If any file applications are removed or added on runtime, the cache is not reflected accordingly until nsh shell is restarted. Signed-off-by: Jari Nippula <jari.nippula@tii.ae>
483984a to
2c4be79
Compare
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.
Summary
There is no command help or command tab completion available
for file apps. This patch adds support for those, similar to what is
implemented for buildin apps.
Impact
Static completion cache is allocated when tab completion is used
first time. This cache remains in memory until system reboots/shutdown.
Testing