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

Please guide how to start using clink in the .lua file #545

Open
dev-mustache opened this issue Aug 18, 2020 · 1 comment
Open

Please guide how to start using clink in the .lua file #545

dev-mustache opened this issue Aug 18, 2020 · 1 comment

Comments

@dev-mustache
Copy link

dev-mustache commented Aug 18, 2020

Dear all.

I would like to use clink for my prompt customization, but I really have no ideas where to start to use clink within the lua files

I have installed both lua, clink

lua -v # 5.3.5
clink -h # 0.4.9

I have a very lua file as shown below

script.lua

print(clink)
print(clink.get_env('CMDER_ROOT'))

I tried to execute the script.lua using lua script.lua, then I got the result as shown below

Result

nil
C:\Users\John\scoop\apps\lua\current\lua.exe: script.lua:2: attempt to index a nil value (global 'clink')
stack traceback:
        script.lua:2: in main chunk
        [C]: in ?

I also tried using clink inject && lua script.lua but the result was nothing at all, no errors

Please guide how to use clink from within the lua file, thanks.

@chrisant996
Copy link

I recommend starting with Extending Clink, and reading the rest of the Clink documentation.

Also, this repo has been abandoned for a few years. A fork has become the new de facto official repo: chrisant996/clink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants