Skip to content

feat(Shell): add methods to add environmental variables and builtins#447

Merged
reubeno merged 1 commit into
reubeno:mainfrom
Elsie19:insert-var
Apr 26, 2025
Merged

feat(Shell): add methods to add environmental variables and builtins#447
reubeno merged 1 commit into
reubeno:mainfrom
Elsie19:insert-var

Conversation

@Elsie19
Copy link
Copy Markdown
Contributor

@Elsie19 Elsie19 commented Apr 25, 2025

This will be specifically useful for my cases, where I will be inserting variables and builtins (https://github.com/pacstall/pacstall/wiki/101.1-Variables#built-in-variables) into the environment before I source/run a script, but I'm sure a lot of people wanting to interface with brush will also find it useful.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 25, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 18.35 μs 18.29 μs -0.05 μs ⚪ Unchanged
eval_arithmetic 0.17 μs 0.17 μs 0.00 μs ⚪ Unchanged
expand_one_string 1.81 μs 1.83 μs 0.02 μs ⚪ Unchanged
for_loop 22.32 μs 22.42 μs 0.10 μs ⚪ Unchanged
function_call 2.35 μs 2.49 μs 0.14 μs ⚪ Unchanged
instantiate_shell 56.87 μs 56.99 μs 0.12 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 23402.66 μs 25633.90 μs 2231.24 μs 🟠 +9.53%
parse_bash_completion 1657.43 μs 1664.22 μs 6.79 μs ⚪ Unchanged
parse_sample_script 1.75 μs 1.72 μs -0.03 μs ⚪ Unchanged
run_echo_builtin_command 15.75 μs 15.88 μs 0.12 μs ⚪ Unchanged
run_one_external_command 4399.59 μs 2496.26 μs -1903.33 μs 🟢 -43.26%
tokenize_sample_script 2.82 μs 2.80 μs -0.02 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/shell.rs 🟢 86.07% 🟢 85.91% 🔴 -0.16%
Overall Coverage 🟢 78.35% 🟢 78.34% 🔴 -0.01%

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

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1305 61.88
❗️ Error 240 11.38
❌ Fail 192 9.10
⏩ Skip 357 16.93
❎ Expected Fail 15 0.71
📊 Total 2109 100.00

Comment thread brush-core/src/shell.rs Outdated
Comment thread brush-core/src/shell.rs
Comment thread brush-core/src/shell.rs Outdated
@reubeno reubeno merged commit 464a32d into reubeno:main Apr 26, 2025
24 checks passed
@Elsie19 Elsie19 deleted the insert-var branch April 26, 2025 20:41
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