Skip to content

Commit

Permalink
fix: parameter completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloxaf committed Feb 26, 2024
1 parent 981cf96 commit 1133a88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fzf-tab.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ builtin unalias -m '[^+]*'

if (( ! _ftb_continue_last )) \
&& [[ $compstate[insert] == *"unambiguous" ]] \
&& [[ "$compstate[unambiguous]" != "$PREFIX" ]]; then
&& [[ "$compstate[unambiguous]" != "$IPREFIX$PREFIX" ]]; then
compstate[list]=
compstate[insert]=unambiguous
_ftb_finish=1
Expand Down
12 changes: 12 additions & 0 deletions test/fzftab.ztst
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@
>C1:{dir1/}
>C1:{dir2/}

comptesteval 'zstyle ":completion:*" menu false'
comptesteval "local prefix_1=1 prefix_2=1 prenofix_3=1"
comptest $'echo $pre\t'
comptesteval 'zstyle ":completion:*" menu true'
0:parameter completion
>line: {echo $pre}{}
>QUERY:{}
>DESCRIPTION:{parameter}
>C1:{prefix_1}
>C1:{prefix_2}
>C1:{prenofix_3}

%clean

zmodload -ui zsh/zpty
Expand Down

0 comments on commit 1133a88

Please sign in to comment.