-
Notifications
You must be signed in to change notification settings - Fork 400
feat(_comp_compgen_help): enhance for smartctl #1430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c422102
to
b53b143
Compare
Force-pushed new version of 2nd commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry for CI failures. Will address these in the next days. |
d083fae
to
c3c8648
Compare
Force-pushed new version, now combined in one commit. This reformats (as suggested by pre-commit) and fixes the testcases. --- a/test/t/unit/test_unit_parse_help.py
+++ b/test/t/unit/test_unit_parse_help.py
@@ -205,15 +205,19 @@ class TestUnitParseHelp:
def test_33(self, bash):
"""Pattern found in the output of 'smartctl --help'."""
- assert_bash_exec(bash, "fn() { echo '-f A1[,A2[,A3]] --foo=A1[,A2[,A3]]'; }")
+ assert_bash_exec(
+ bash, "fn() { echo '-f A1[,A2[,A3]] --foo=A1[,A2[,A3]]'; }"
+ )
output = assert_bash_exec(bash, "_parse_help fn", want_output=True)
- assert output.split() == "--foo".split()
+ assert output.split() == "--foo=".split()
def test_34(self, bash):
"""Pattern found in the output of 'smartctl --help'."""
- assert_bash_exec(bash, "fn() { echo '-f [+]ARG --foo=[+]ARG'; }")
+ assert_bash_exec(
+ bash, "fn() { echo '-f [+]ARG --foo=[+]ARG'; }"
+ )
output = assert_bash_exec(bash, "_parse_help fn", want_output=True)
- assert output.split() == "--foo".split()
+ assert output.split() == "--foo=".split()
def test_custom_helpopt1(self, bash):
assert_bash_exec(bash, "fn() { [[ $1 == -h ]] && echo '-option'; }")
|
c3c8648
to
de6b0cb
Compare
Obviously my assumption about max allowed title length (4 indentation + 74 title = 78) was wrong. Force-pushed a new version using the original title of this PR. The code is unchanged. |
Allow plus sign and nested braces in short option argument.
de6b0cb
to
19300b5
Compare
Undoing reformatting of |
The CI error in fedoradev seems to have started to happen after the latest |
A followup to #1425 with two commits addressing independent topics.
Should now detect these properly: