Zplug: Error occurs when installing & updating

Created on 5 Dec 2017  ·  10Comments  ·  Source: zplug/zplug

  • Type:

    • [x] Bug

    • [ ] Enhancement

    • [ ] Feature Request

    • [ ] Question


  • zplug --version: 2.4.1
  • zsh --version: 5.4.2-dev-0
  • uname -a: Linux localhost.localdomain 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Minimal zshrc (with less than 30 lines)

# check init.zsh file
if [[ -f $HOME/.zplug/init.zsh ]]; then
  export ZPLUG_LOADFILE=$HOME/dotfiles/.zsh/.zplugrc
  source $HOME/.zplug/init.zsh
else
  curl -sL --proto-redir -all,https "https://raw.githubusercontent.com/zplug/installer/master/installer.zsh"| zsh
  export ZPLUG_LOADFILE=$HOME/dotfiles/.zsh/.zplugrc
  source $HOME/.zplug/init.zsh
fi

# If `zplug check` is false, run `zplug install`
if ! zplug check; then
  zplug install
fi

zplug "zsh-users/zsh-completions"

zplug "zsh-users/zsh-syntax-highlighting", \
             defer:2, \
             from:github

zplug "wting/autojump", \
              from:"github", \
              as:command

Step to reproduce

  1. run zplug update
  2. Error occurs
[zplug] Start to update 3 plugins in parallel

 ⠏  Updating...           zsh-users/zsh-completions
awk: コマンドライン:1:      1-us    function key(name) {ing
awk: コマンドライン:1:       ng/    ^ syntax error
awk: コマンドライン:2:      2           for (i = 1; i <= NF; i++) {
awk: コマンドライン:2:                  ^ syntax error
awk: コマンドライン:4:      4               xs[substr($i, 0, RSTART)] = substr($i, RSTART+1);
awk: コマンドライン:4:                                                ^ syntax error
awk: コマンドライン:6:      6           return xs[name":"];
awk: コマンドライン:6:                  ^ syntax error
 ✘  Unknown error         zsh-users/zsh-syntax-highlighting
awk: コマンドライン:1:      1       function key(name) {
awk: コマンドライン:1:              ^ syntax error
awk: コマンドライン:2:      2           for (i = 1; i <= NF; i++) {
awk: コマンドライン:2:                  ^ syntax error
awk: コマンドライン:4:      4               xs[substr($i, 0, RSTART)] = substr($i, RSTART+1);
awk: コマンドライン:4:                                                ^ syntax error
awk: コマンドライン:1:      1       function key(name) {"];
awk: コマンドライン:1:              ^ syntax errorrror
awk: コマンドライン:2:      2ng/        for (i = 1; i <= NF; i++) {
awk: コマンドライン:2:                  ^ syntax error
awk: コマンドライン:4:      4               xs[substr($i, 0, RSTART)] = substr($i, RSTART+1);
awk: コマンドライン:4:                                                ^ syntax error
awk: コマンドライン:6:      6           return xs[name":"];
awk: コマンドライン:6:                  ^ syntax error
 ✘  Unknown error         zsh-users/zsh-completions
awk: コマンドライン:1:      1       function key(name) {
awk: コマンドライン:1:              ^ syntax error
awk: コマンドライン:2:      2           for (i = 1; i <= NF; i++) {
awk: コマンドライン:2:                  ^ syntax error
awk: コマンドライン:4:      4               xs[substr($i, 0, RSTART)] = substr($i, RSTART+1);
awk: コマンドライン:4:                                                ^ syntax error
awk: コマンドライン:6:      6           return xs[name":"];
awk: コマンドライン:6:                  ^ syntax error
 ✘  Unknown error         zsh-users/zsh-syntax-highlighting
awk: コマンドライン:1:      1       function key(name) {
awk: コマンドライン:1:              ^ syntax error
awk: コマンドライン:2:      2           for (i = 1; i <= NF; i++) {
awk: コマンドライン:2:                  ^ syntax error
awk: コマンドライン:4:      4               xs[substr($i, 0, RSTART)] = substr($i, RSTART+1);
awk: コマンドライン:4:                                                ^ syntax error
awk: コマンドライン:6:      6           return xs[name":"];
awk: コマンドライン:6:                  ^ syntax error
 ✘  Unknown error         wting/autojump

[zplug] Elapsed time: 2.9870 sec.
 ==> Updating finished successfully!
awk: コマンドライン:1:      1       function key(name) {
awk: コマンドライン:1:              ^ syntax error
awk: コマンドライン:2:      2           for (i = 1; i <= NF; i++) {
awk: コマンドライン:2:                  ^ syntax error
awk: コマンドライン:4:      4               xs[substr($i, 0, RSTART)] = substr($i, RSTART+1);
awk: コマンドライン:4:                                                ^ syntax error
awk: コマンドライン:6:      6           return xs[name":"];
awk: コマンドライン:6:                  ^ syntax error
HELP WANTED

Most helpful comment

I had the exact same issue as op, after looking through and disabling parts of my zsh files i found that my cat alias was the problem:

alias cat="cat -n"

After removing it zplug worked as expected. Anyone able to reproduce it?

All 10 comments

Please tell us the result of trying awk -W version.


使用してるAWKの種類を知りたいので awk -W version した結果を教えてください

> awk -W version

GNU Awk 4.2.0, API: 2.0
Copyright (C) 1989, 1991-2017 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

I've just installed zplug from git and all installations had error, but everything seems to be working:
```zsh

  • b4b4r07/enhancd: not installed
    Install? [y/N]: y
    [zplug] Start to install 1 plugins in parallel

✘ Unknown error b4b4r07/enhancd

[zplug] Elapsed time: 1.9880 sec.
==> Installation finished successfully!

Also with status:

~ zplug status
[zplug] Start to get remote status 16 plugins in parallel

 ✘  Unknown error         plugins/autojump
 ✘  Unknown error         plugins/web-search
 ✘  Unknown error         plugins/ripgrep
 ✘  Unknown error         zsh-users/zsh-autosuggestions
 ✘  Unknown error         b4b4r07/enhancd
 ✘  Unknown error         zsh-users/zsh-history-substring-search
 ✘  Unknown error         plugins/debian
 ✘  Unknown error         zdharma/fast-syntax-highlighting
 ✘  Unknown error         plugins/buku
 ✘  Unknown error         zplug/zplug
 ✘  Unknown error         plugins/common-aliases
 ✘  Unknown error         plugins/copybuffer
 ✘  Unknown error         molovo/tipz
 ✘  Unknown error         themes/robbyrussell
 ✘  Unknown error         plugins/git
 ✘  Unknown error         zdharma/history-search-multi-word

[zplug] Elapsed time: 5.4083 sec.
 ==> All packages are up-to-date!

I’ll fix this in a dew days. Thanks

@yasuto777 How did you install your zsh?

I tried to reproduce this problem on the following environment but unfortunately it couldn't do that.

  • zsh 5.x (5.0.2)
  • zplug 2.4.1
  • awk 4.2.0

The difference between your environment and me is only the version of zsh so I want to know how to install its zsh.

I was using Debian stable (stretch).

  • zsh 5.4.2
  • zplug 2.4.1
  • awk 4.2.0

I do not know, but fixed.
Thanks.

I had the exact same issue as op, after looking through and disabling parts of my zsh files i found that my cat alias was the problem:

alias cat="cat -n"

After removing it zplug worked as expected. Anyone able to reproduce it?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bootleq picture bootleq  ·  3Comments

asymmetric picture asymmetric  ·  11Comments

kdheepak picture kdheepak  ·  10Comments

jottr picture jottr  ·  6Comments

jottr picture jottr  ·  5Comments