Include alias name in YamlRunner prog parameter#55
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
Pull request overview
Adjusts the CLI “prog” value passed to YamlRunner so xts <alias> --help shows correct usage including the alias name, aligning help output with how users actually invoke aliased commands.
Changes:
- Added
_alias_nametoXTSto track the alias used for invocation. - Set
_alias_nameduring first-arg parsing after alias resolution. - Passed
program=f'xts {alias}'intoYamlRunnerso usage includes the alias.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| raise SystemExit(1) | ||
|
|
||
| # load xts config remove alias name from argv before parsing | ||
| self.xts_config = resolved_xts_path | ||
| self._alias_name = alias_name |
There was a problem hiding this comment.
utils.error(...) already raises SystemExit(1), so the subsequent raise SystemExit(1) is unreachable. Consider removing the redundant raise to avoid dead code and keep the control flow clear.
Co-authored-by: TB-1993 <109213741+TB-1993@users.noreply.github.com>
Co-authored-by: TB-1993 <109213741+TB-1993@users.noreply.github.com>
Co-authored-by: TB-1993 <109213741+TB-1993@users.noreply.github.com>
Co-authored-by: TB-1993 <109213741+TB-1993@users.noreply.github.com>
3c1b16b to
bdf9f62
Compare
When invoking
xts <alias> --help, the help message showedUsage: xts [-h]instead ofUsage: xts <alias> [-h], making usage examples incorrect for aliased commands.Changes
_alias_nameinstance variable toXTSclass to capture the resolved alias name_parse_first_arg()after resolutionf'xts {self._alias_name}'when initializingYamlRunnerinrun()methodExample
Before:
After:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.