Include alias name in YamlRunner prog parameter#55
Open
Conversation
Copilot
AI
changed the title
[WIP] Fix prog name in YamlRunner help message
Include alias name in YamlRunner prog parameter for help messages
Jan 28, 2026
Copilot
AI
changed the title
Include alias name in YamlRunner prog parameter for help messages
Remove unnecessary instance variable for alias name
Jan 28, 2026
Copilot
AI
changed the title
Remove unnecessary instance variable for alias name
Include alias name in YamlRunner prog parameter
Jan 30, 2026
TB-1993
approved these changes
Feb 6, 2026
|
All contributors have signed the CLA ✍️ ✅ |
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.
Comment on lines
+203
to
+207
| 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
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.
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.