Skip to content

Comments

fix(complete): complete current and parent directories.#887

Open
MasahikoSawada wants to merge 1 commit intoreubeno:mainfrom
MasahikoSawada:complete_current_parent_dirs
Open

fix(complete): complete current and parent directories.#887
MasahikoSawada wants to merge 1 commit intoreubeno:mainfrom
MasahikoSawada:complete_current_parent_dirs

Conversation

@MasahikoSawada
Copy link
Contributor

This PR is to complete '.' (current directory) and '..' (parent directory) correctly.

@MasahikoSawada MasahikoSawada force-pushed the complete_current_parent_dirs branch from f767818 to d99396f Compare December 31, 2025 06:28
@github-actions
Copy link

github-actions bot commented Dec 31, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 17.48 μs 17.70 μs 0.23 μs 🟠 +1.30%
eval_arithmetic 0.15 μs 0.15 μs 0.00 μs ⚪ Unchanged
expand_one_string 1.53 μs 1.55 μs 0.02 μs ⚪ Unchanged
for_loop 22.23 μs 22.17 μs -0.06 μs ⚪ Unchanged
function_call 2.20 μs 2.19 μs -0.01 μs ⚪ Unchanged
instantiate_shell 53.98 μs 53.66 μs -0.32 μs 🟢 -0.59%
instantiate_shell_with_init_scripts 24169.07 μs 24057.18 μs -111.89 μs ⚪ Unchanged
parse_bash_completion 1998.11 μs 1994.58 μs -3.53 μs ⚪ Unchanged
parse_sample_script 1.92 μs 1.91 μs -0.01 μs ⚪ Unchanged
run_echo_builtin_command 15.39 μs 15.55 μs 0.16 μs ⚪ Unchanged
tokenize_sample_script 3.54 μs 3.49 μs -0.05 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/completion.rs 🟠 68.15% 🟠 68.18% 🟢 0.03%
brush-core/src/expansion.rs 🟢 94.5% 🟢 94.42% 🔴 -0.08%
Overall Coverage 🟢 76.25% 🟢 76.24% 🔴 -0.01%

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

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1562 74.06
❗️ Error 18 0.85
❌ Fail 175 8.30
⏩ Skip 339 16.07
❎ Expected Fail 13 0.62
✔️ Unexpected Pass 2 0.09
📊 Total 2109 100.00

@reubeno
Copy link
Owner

reubeno commented Dec 31, 2025

Thanks for posting this, @MasahikoSawada! The change looks reasonable and even seems to increase the pass rate on bash-completion tests 😄

The test failure looks like it's coming from the new assertions you've added to completion_tests.rs. I assume you'll look into that?

@reubeno reubeno added area: completion Issues or PRs related to completion area: compat Related to compatibility with standard shells labels Dec 31, 2025
@reubeno
Copy link
Owner

reubeno commented Feb 18, 2026

Hi @MasahikoSawada -- are you still interested in finishing this up?

We appreciate the contribution and it would be great to get this merged. (I'm assuming it primarily needs a rebase and a look at the failing unit tests?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compat Related to compatibility with standard shells area: completion Issues or PRs related to completion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants