reubeno / brush

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

fix: deduplicate completion candidates #189

Closed reubeno closed 1 month ago

reubeno commented 1 month ago

Some standard bash completion functions will generate duplicate results; it's the responsibility of the shell to deduplicate appropriately.

github-actions[bot] commented 1 month ago

Test Results

  2 files    8 suites   51s :stopwatch: 423 tests 423 :white_check_mark: 0 :zzz: 0 :x: 846 runs  846 :white_check_mark: 0 :zzz: 0 :x:

Results for commit deeebf04.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 1 month ago

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.35 μs 3.36 μs 0.01 μs ⚪ Unchanged
instantiate_shell 60.79 μs 60.12 μs -0.67 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 25350.85 μs 25576.06 μs 225.22 μs 🟠 +0.89%
parse_bash_completion 2721.96 μs 2680.22 μs -41.74 μs 🟢 -1.53%
parse_sample_script 4.00 μs 3.94 μs -0.06 μs ⚪ Unchanged
run_echo_builtin_command 90.63 μs 89.46 μs -1.17 μs ⚪ Unchanged
run_one_builtin_command 110.29 μs 109.97 μs -0.32 μs ⚪ Unchanged
run_one_external_command 1912.83 μs 1814.14 μs -98.69 μs 🟢 -5.16%
run_one_external_command_directly 949.55 μs 950.97 μs 1.42 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/completion.rs 🔴 18.06% 🔴 17.92% 🔴 -0.14%
brush-core/src/shell.rs 🟢 75.98% 🟢 76.43% 🟢 0.45%
brush-shell/src/main.rs 🟢 92.31% 🟢 93.01% 🟢 0.7%
Overall Coverage 🟢 72.41% 🟢 72.19% 🔴 -0.22%

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