VisionSystemsInc / VisionSystemsInc/vsi_common
Remove JUST_HELP_SEPARATOR
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8
- Forks
- 9
- Avg merge
- 36m
- Merged PRs (30d)
- 1
Description
Currently, _just_commands_from_file parses bash files to get the targets and help in one go and stored in an array. From here on all of just's logic uses this JUST_HELP_SEPARATOR and parses this one array accordingly, adding addition complicated logic that is unneeded.
I propose a new pattern that instead of setting parsed_help_a, it instead sets two arrays right away, parsed_commands_a and parsed_help_a, thus simplifying the rest of just
The awk code could even be modified (add to the end) to do something like:
Before:
target1 #@#Target1 help
target2 #@#Target2 help
After
target1
Target1 help
target2
Target2 help
By adding s|#@#(.*)|\n\1| in non-global, which would theoretically allow for a comment to contain #@# but not a target.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in linux/just_common.bsh at _just_commands_from_file and trace how JUST_HELP_SEPARATOR, parsed_commands_a, and parsed_help_a are consumed. Review the awk parsing and all downstream uses of the combined array. Done means commands and help are populated separately, separator parsing is removed, and existing just command/help behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100