yarn-completion: "counter" and "cmd" must be set by the caller and be the appropriate type

Currently any tab completion after yarn ends with this message and exit. Seems to me that a declare cmd does not make it in the check before the exit.

joma@edison:~$ homestead ssh
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-112-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

215 packages can be updated.
76 updates are security updates.


Last login: Tue Apr  3 23:03:34 2018 from 10.0.2.2
vagrant@homestead:~$ bash --version
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
vagrant@homestead:~$ set -v
vagrant@homestead:~$ . ~/.yarn-completion
vagrant@homestead:~$ yarn __yarn_get_package_fields scripts
pwd
cword=1
words[0]=${!ref}${COMP_WORDS[i]}
words[1]=${!ref}${COMP_WORDS[i]}
cword=1
words=("${@:3:2}")
cword="$3"
cur="$3"
cur="$3"
cword="$3"
prev="$3"
words=("${@:3:2}")
declare -p counter cmd 2>/dev/null | awk '{ printf "%s", $2 }'
"counter" and "cmd" must be set by the caller and be the appropriate type
logout
# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
Connection to 127.0.0.1 closed.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Thank you @dsifford for your support;

Makeing the mentioned bash release http://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz from source locally, the following result nailed it for me.

~$ echo $BASH_VERSION
4.4.0(1)-release
~$ declare testa
~$ declare -p testa
declare -- testa

I have opened a question on stackoverflow.