Giter Club home page Giter Club logo

Comments (9)

thcyron avatar thcyron commented on June 15, 2024

@thetechnick Can you have a look?

from cli.

chrisWhyTea-zz avatar chrisWhyTea-zz commented on June 15, 2024

How to reproduce:

  • use windows 10 with git bash
  • ssh to a linux machine with installed zsh and golang-1.9
  • install hcloud lib via go get and configure the autocompletion for zsh
  • create and use a hcloud context
  • try to create a new server hcloud server create --name xyz.xyz --ssh-key now try to autocomplete the sshkey

Result:
_handle_flag:27: bad math expression: illegal character: ^[

from cli.

hbokh avatar hbokh commented on June 15, 2024

FWIW - this seems to be of no issue on macOS 10.13.3 with zsh 5.4.2 (x86_64-apple-darwin17.3.0) / "Oh-My-Zsh".

from cli.

joto avatar joto commented on June 15, 2024

I can reproduce this on Linux with zsh 5.3.1. The culprit seem to be these lines:

    # keep flag value with flagname as flaghash
    # flaghash variable is an associative array which is only supported in bash > 3.
    if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
        if [ -n "${flagvalue}" ] ; then
            flaghash[${flagname}]=${flagvalue}
        elif [ -n "${words[ $((c+1)) ]}" ] ; then
            flaghash[${flagname}]=${words[ $((c+1)) ]}
        else
            flaghash[${flagname}]="true" # pad "true" for bool flag
        fi
    fi

It doesn't seem like the flaghash is used anywhere. It is set here but never read. I just removed those lines and the error went away.

from cli.

joto avatar joto commented on June 15, 2024

Ups. What did just happen. Why does it say "joto unassigned thetechnick a minute ago"? I didn't do anything like that and don't think I can even do that...

from cli.

github-actions avatar github-actions commented on June 15, 2024

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

from cli.

joto avatar joto commented on June 15, 2024

Does that mean that this comment will "unstale" it?

from cli.

eike-fokken avatar eike-fokken commented on June 15, 2024

If it helps, I have a similar (the same?) issue directly on Linux with zsh 5.8 (x86_64-debian-linux-gnu)
I'm using the workaround for antigen described in #239 .

Error message when pressing tab after:
hcloud server create --image debian-10 --ssh-key
is

hcloud server create --image debian-10 --ssh-key __hcloud_handle_flag:31: bad math expression: illegal character: ^[

from cli.

LKaemmerling avatar LKaemmerling commented on June 15, 2024

Closed with #239

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.