Skip to content
Myr

[bash/zsh] Fix missing fuzzy completions (#1303)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* [bash/zsh] Fix missing fuzzy completions `cat foo**<TAB>` did not display the file `foobar` if there was a directory named `foo`. Fixes #1301 * [zsh] Evaluate completion prefix cat $HOME** cat ~username** cat ~username/foo**

authored by ptzz · committed by Junegunn Choi · parent 76a2dcb · Browse files · 2 files+5 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−6 removed

  • other:+5 added−6 removed

2 files+5 added−6 removed

modified:shell/completion.bash+1 added-1 removed
146 unmodified lines
147 if [[ "$cur" == *"$trigger" ]]; then148 base=${cur:0:${#cur}-${#trigger}}149 eval "base=$base"150151 dir="$base"151 [[ $base = *"/"* ]] && dir="$base"152 while true; do153 if [ -z "$dir" ] || [ -d "$dir" ]; then154 leftover=${base/#"$dir"}155 leftover=${leftover/#\/}
177 unmodified lines
modified:shell/completion.zsh+4 added-5 removed