Repository navigation
refactor(#585): the invocation-aware help/version surface moves to the lib - #606
Merged
Merged
Conversation
…e lib The bash/sh fork (rubash#596) lived in this crate's bin target, so the niu launcher - which embeds the engine as a library - kept answering 'bash --help' with the product help (owner report 2026-10-14: the installed shell's bash shim reaches niu.exe, whose launcher parser never saw the fork). rubash::usage now owns the contract: invocation_help_name, show_shell_help, show_shell_version, and the LONG_OPTIONS tables the argv parser and the usage block share. The engine binary calls the same functions (the #585 byte-contract regressions pass unchanged); the version line falls back to the executor's advertised BASH_VERSION value when the caller has no executor. No behavior change for any current caller - this is the export the niu host-half needs.
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.
Owner hit the host half of #585 live: the installed shell's bash shim reaches niu.exe (the launcher), whose parser printed the product help under
bash --help- the rubash#596 fork lived in this crate's bin target where the launcher can't reach it.rubash::usagenow owns the contract (invocation_help_name/show_shell_help/show_shell_version/ the LONG_OPTIONS tables). The engine binary calls the same functions;issue585_invocation_aware_help_regressionspasses 4/4 unchanged (byte contracts intact). No behavior change for current callers - this is the export the niu host half needs (niubash PR follows once this merges).