Suponho que você queira dizer que quando você TAB
conclui um comando / nome de arquivo, um espaço é adicionado automaticamente, mas depois de pressionar |
ele desaparece novamente.
Caso contrário, não posso reproduzir esse efeito.
No entanto, nesse caso, a solução deve ser tão simples quanto
ZLE_REMOVE_SUFFIX_CHARS=""
A explicação é um pouco complicada, então eu simplesmente cito man zshparam
ZLE_REMOVE_SUFFIX_CHARS
/ZLE_SPACE_SUFFIX_CHARS
These parameters are used by the line editor. In certain circumstances suffixes (typically space or slash) added by the completion system will be removed automatically, either because the next editing command was not an insertable character, or because the character was marked as requiring the suffix to be removed.These variables can contain the sets of characters that will cause the suffix to be removed. If
ZLE_REMOVE_SUFFIX_CHARS
is set, those characters will cause the suffix to be removed; ifZLE_SPACE_SUFFIX_CHARS
is set, those characters will cause the suffix to be removed and replaced by a space.If
ZLE_REMOVE_SUFFIX_CHARS
is not set, the default behaviour is equivalent to:ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&|'
If
ZLE_REMOVE_SUFFIX_CHARS
is set but is empty, no characters have this behaviour.ZLE_SPACE_SUFFIX_CHARS
takes precedence, so that the following:ZLE_SPACE_SUFFIX_CHARS=$'&|'
causes the characters
&
and|
to remove the suffix but to replace it with a space.To illustrate the difference, suppose that the option
AUTO_REMOVE_SLASH
is in effect and the directory DIR has just been completed, with an appended/
, following which the user types&
. The default result isDIR&
. WithZLE_REMOVE_SUFFIX_CHARS
set but without including&
the result isDIR/&
. WithZLE_SPACE_SUFFIX_CHARS
set to include&
the result isDIR &
.Note that certain completions may provide their own suffix removal or replacement behaviour which overrides the values described here.