prezto icon indicating copy to clipboard operation
prezto copied to clipboard

Tab completion result duplication

Open isundaylee opened this issue 5 years ago • 1 comments

Description

Sometimes the entire tab completion result is shown twice with custom completion function. This issue is gone if this line (https://github.com/sorin-ionescu/prezto/blob/master/modules/completion/init.zsh#L71) is commented out. This issue does NOT happen with built-in default path completion (i.e. type in cd and press TAB does NOT trigger this issue).

Expected behavior

Tab completion result should only be shown once.

Actual behavior

Screenshot:

Screen Shot 2019-07-07 at 9 43 51 PM

Steps to Reproduce

  1. Add the following test function and completion function to ~/.zshrc:
function testgoto {
  cd $HOME/$1
}

function _testgoto {
  _files -W $HOME -/
}

compdef _testgoto testgoto
  1. Type testgoto and press TAB in zsh.

Versions

  • Prezto commit: e94b6b2078ccd0b289293dc4b996983a96a34681
  • ZSH version: 5.5.1
  • OS information: macOS Mojave 10.14.4 (18E226)

isundaylee avatar Jul 08 '19 01:07 isundaylee

I still see this behavior (Prezto commit: d6e1ef5), zsh 5.8 (x86_64-ubuntu-linux-gnu), Ubuntu 21.04

indigoviolet avatar Feb 06 '22 02:02 indigoviolet