reubeno / brush

bash/POSIX-compatible shell implemented in Rust
MIT License
27 stars 4 forks source link

fix: honor IFS in read builtin #208

Closed reubeno closed 1 month ago

reubeno commented 1 month ago

Ensure that splitting happening in read honors the current effective value of IFS in the current environment.

Among other things, this fixes completion for arguments to tar. (The custom completion routines for tar in bash-completion do custom parsing of the --help output of tar; that parsing required reading in that output and using complex regexes to match against it.)

github-actions[bot] commented 1 month ago

Test Results

  2 files    9 suites   1m 7s :stopwatch: 470 tests 470 :white_check_mark: 0 :zzz: 0 :x: 931 runs  931 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 55fd9154.

github-actions[bot] commented 1 month ago

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.40 μs 3.40 μs 0.00 μs ⚪ Unchanged
instantiate_shell 60.35 μs 59.91 μs -0.44 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 28420.77 μs 28564.46 μs 143.69 μs ⚪ Unchanged
parse_bash_completion 2709.96 μs 2709.72 μs -0.25 μs ⚪ Unchanged
parse_sample_script 4.01 μs 3.96 μs -0.04 μs ⚪ Unchanged
run_echo_builtin_command 90.99 μs 89.70 μs -1.29 μs ⚪ Unchanged
run_one_builtin_command 108.07 μs 107.00 μs -1.06 μs ⚪ Unchanged
run_one_external_command 1972.55 μs 2037.43 μs 64.88 μs 🟠 +3.29%
run_one_external_command_directly 1012.10 μs 1015.45 μs 3.35 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/builtins/read.rs 🟠 65% 🟠 66.27% 🟢 1.27%
brush-core/src/shell.rs 🟢 76.97% 🟢 77.4% 🟢 0.43%
brush-shell/src/main.rs 🟢 89.61% 🟢 90.26% 🟢 0.65%
Overall Coverage 🟢 72.54% 🟢 72.58% 🟢 0.04%

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