zsh-users / zsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.
github.com/zsh-users/zsh-syntax-highlighting
BSD 3-Clause "New" or "Revised" License
20k stars 1.33k forks source link

History expansions with pasted words #843

Open danielshahaf opened 2 years ago

danielshahaf commented 2 years ago
% ho hello world 
zsh: command not found: ho
% ec!! 
echo hello world  
hello world
%     

In the above, ec!! is red (typeset -a region_highlight=( '0 4 fg=red,bold memo=zsh-syntax-highlighting' )), but shouldn't be.

Compare #713.

danielshahaf commented 2 years ago

Aside: I dumped region_highlight there by doing:

f() { typeset -p region_highlight > /dev/tty }
zle -N f
bindkey '^T' f