Public bug reported: After upgrading to wily, trying to Tab autocomplete prints a bunch of errors.
It seems that if [[ -z "$skip_global_compinit" ]]; then autoload -U compinit compinit fi in /etc/zsh/zshrc, and the completion rules it loads from /usr/share/zsh/functions/Completion, is incompatible with KSH_ARRAYS and KSH_GLOB, which previously worked fine in vivid. Repro: --- sudo useradd -m zshtest sudo su - zshtest cat >.zshrc <<EOF emulate sh setopt KSH_ARRAYS setopt KSH_GLOB EOF sudo su - zshtest cd /<TAB> mikel-study% cd / _all_labels:63: bad math expression: operator expected at `funcstack ...' _description:63: bad math expression: operator expected at `comp_ignor...' _path_files:63: bad math expression: operator expected at `pfx ' _path_files:63: bad math expression: operator expected at `prepaths ' _path_files:63: bad math expression: operator expected at `ignore ' _path_files:63: bad math expression: operator expected at `ignore' _main_complete:338: bad math expression: operator expected at `lastdescr' _main_complete:377: bad math expression: operator expected at `comp_color...' --- Putting skip_global_compinit=1 in ~/.zshenv works around the problem, as does "unsetopt GLOBAL_RCS". I imagine my set up is unsupported, but I notice that /usr/share/zsh/functions/Completion/compinit at least makes an attempt to avoid this by doing --- emulate -L zsh setopt extendedglob --- One pattern that seems likely to be problematic is the dynamic definition of functions inside other functions, such as _next_tags creating _all_labels inside its body, which presumably uses the current shell options rather than the ones the completions assume are active. $ dpkg -S /etc/zsh/zshrc /usr/share/zsh/functions/Completion/Base/_next_tags zsh-common: /etc/zsh/zshrc zsh-common: /usr/share/zsh/functions/Completion/Base/_next_tags $ apt-cache show zsh-common Package: zsh-common Priority: optional Section: shells Installed-Size: 11882 Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> Original-Maintainer: Debian Zsh Maintainers <pkg-zsh-de...@lists.alioth.debian.org> Architecture: all Source: zsh Version: 5.1.1-1ubuntu1 ** Affects: zsh (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1514909 Title: zsh compinit breaks with KSH_ARRAYS, KSH_GLOB To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1514909/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs