Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clink completion failing #987

Closed
Naushi opened this issue Jun 8, 2016 · 3 comments
Closed

Clink completion failing #987

Naushi opened this issue Jun 8, 2016 · 3 comments
Labels
👆 clink-completions Upstream issue in clink-completions. ❌ Outdated Installation

Comments

@Naushi
Copy link

Naushi commented Jun 8, 2016

I just found out that if clink was failing to show the correct strings for the prompt ({git}, {lambda} etc...) it was because it detected a package.json file in the folder I was accessing, and since this file didn't specify the version of the package (one freshly created with Yeoman), clink just gave up with a

...gram Files\cmder/vendor/clink-completions/npm_prompt.lua:11: attempt to concatenate local 'package_version' (a nil value)

Adding "version":"1.0" in the package.json file actually solved the issue but it would be cool if clink handled that better!

I don't know if it depends on something cmder does or if I should contact the clink devs directly, sorry if it's not where I should post.

@pleverett
Copy link

You can also get rid of the error by opening the file "npm_prompt.lua" and replace line 11 with the following:

    local package_string = ''
    if package_version ~= nil then
      package_string = color.color_text("("..package_name.."@"..package_version..")", color.YELLOW)
    else
      package_string = color.color_text("("..package_name..")", color.YELLOW)
    end

@Stanzilla Stanzilla added the 👆 clink-completions Upstream issue in clink-completions. label Jun 16, 2016
@Stanzilla
Copy link
Member

@vladimir-kotikov that's fixed already, right?

@vladimir-kotikov
Copy link
Contributor

Yup, fixed in 75deb4f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👆 clink-completions Upstream issue in clink-completions. ❌ Outdated Installation
Projects
None yet
Development

No branches or pull requests

4 participants