Skip to content

fix: bang formatted without space leads to invalid command#1109

Merged
reubeno merged 1 commit intoreubeno:mainfrom
cilki:main
Apr 26, 2026
Merged

fix: bang formatted without space leads to invalid command#1109
reubeno merged 1 commit intoreubeno:mainfrom
cilki:main

Conversation

@cilki
Copy link
Copy Markdown
Contributor

@cilki cilki commented Apr 26, 2026

When formatting a negated command like:

! $0

Pipeline::fmt results in:

!$0

which is incorrect.

@reubeno
Copy link
Copy Markdown
Owner

reubeno commented Apr 26, 2026

Thanks for the contribution! The change seems reasonable.

I’ve queued the PR checks to run so we can see their results.

@github-actions
Copy link
Copy Markdown

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 17.35 μs 17.54 μs 0.19 μs 🟠 +1.08%
eval_arithmetic 0.16 μs 0.16 μs -0.00 μs ⚪ Unchanged
expand_one_string 1.57 μs 1.60 μs 0.02 μs ⚪ Unchanged
for_loop 31.09 μs 30.68 μs -0.42 μs ⚪ Unchanged
full_peg_complex 57.32 μs 57.12 μs -0.21 μs ⚪ Unchanged
full_peg_for_loop 6.37 μs 6.29 μs -0.08 μs ⚪ Unchanged
full_peg_nested_expansions 16.54 μs 16.78 μs 0.24 μs 🟠 +1.46%
full_peg_pipeline 4.20 μs 4.23 μs 0.02 μs ⚪ Unchanged
full_peg_simple 1.72 μs 1.78 μs 0.06 μs 🟠 +3.48%
function_call 4.23 μs 3.56 μs -0.67 μs 🟢 -15.78%
instantiate_shell 55.63 μs 55.39 μs -0.24 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 30697.73 μs 30868.43 μs 170.70 μs ⚪ Unchanged
parse_peg_bash_completion 2093.14 μs 2091.08 μs -2.06 μs ⚪ Unchanged
parse_peg_complex 19.01 μs 18.05 μs -0.96 μs 🟢 -5.05%
parse_peg_for_loop 1.90 μs 1.87 μs -0.03 μs 🟢 -1.74%
parse_peg_pipeline 1.91 μs 2.03 μs 0.12 μs ⚪ Unchanged
parse_peg_simple 1.03 μs 1.06 μs 0.03 μs 🟠 +3.02%
run_echo_builtin_command 17.35 μs 16.69 μs -0.66 μs 🟢 -3.81%
tokenize_sample_script 3.58 μs 3.60 μs 0.02 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-test-harness/src/comparison.rs 🟢 76.92% 🟢 80.77% 🟢 3.85%
brush-test-harness/src/reporting.rs 🔴 11.62% 🔴 29.93% 🟢 18.31%
brush-test-harness/src/runner.rs 🟢 84.17% 🟢 84.77% 🟢 0.6%
brush-test-harness/src/util.rs 🔴 47.76% 🟠 71.64% 🟢 23.88%
Overall Coverage 🟢 74.39% 🟢 74.72% 🟢 0.33%

Minimum allowed coverage is 70%, this run produced 74.72%

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1582 75.01
❗️ Error 17 0.81
❌ Fail 156 7.40
⏩ Skip 339 16.07
❎ Expected Fail 13 0.62
✔️ Unexpected Pass 2 0.09
📊 Total 2109 100.00

Copy link
Copy Markdown
Owner

@reubeno reubeno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failing PR checks are unrelated; we'll resolve those separately.

Change looks good.

@reubeno reubeno merged commit 760636c into reubeno:main Apr 26, 2026
45 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants