Hi Chuangang,
My openEuler zsh reports these errors on startup:
/root/.zshrc:12: colors: function definition file not found
/root/.shell/zsh_completion:7: compinit: function definition file not found
/root/.shell/zsh_completion:213: command not found: compdef
/root/.shell/zsh_completion:216: command not found: compdef
/root/.shell/zsh_completion:219: command not found: compdef
/root/.shell/zsh_completion:222: command not found: compdef
/root/.shell/zsh_completion:223: command not found: compdef
/root/.shell/zsh_completion:226: command not found: compdef
strace shows missing one of these files:
newfstatat(AT_FDCWD, "/usr/local/share/zsh/site-functions.zwc", 0xffffcf1a79c8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/share/zsh/site-functions/colors.zwc", 0xffffcf1a7a48, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/share/zsh/site-functions/colors", 0xffffcf1a7ac8, 0) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/local/share/zsh/site-functions/colors", R_OK) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/zsh/site-functions.zwc", 0xffffcf1a79c8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/zsh/site-functions/colors.zwc", 0xffffcf1a7a48, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/zsh/site-functions/colors", 0xffffcf1a7ac8, 0) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/share/zsh/site-functions/colors", R_OK) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/zsh/5.7.1/functions.zwc", 0xffffcf1a79c8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/zsh/5.7.1/functions/colors.zwc", 0xffffcf1a7a48, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/zsh/5.7.1/functions/colors", 0xffffcf1a7ac8, 0) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/share/zsh/5.7.1/functions/colors", R_OK) = -1 ENOENT (No such file or directory)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "/root/.zshrc:12: colors: functio"..., 60) = 60
CentOS 8 is fine and the file is at
root ~/rpmbuild# rpm -ql zsh|grep colors
/usr/share/zsh/5.5.1/functions/colors
So the root cause is, lots of dirs/files under
/usr/share/zsh/5.7.1/functions/
are missing in openEuler RPM.
Thanks,
Fengguang