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

Add CallLua and CallLuaSilently #177

Merged
merged 2 commits into from
May 22, 2021
Merged

Add CallLua and CallLuaSilently #177

merged 2 commits into from
May 22, 2021

Conversation

sayanarijit
Copy link
Owner

This works:

xplr.fn.custom.ping = function(app)
  print("What's your name?")
  local name = io.read()
  os.execute('read -p "Hello ' .. name .. ', you are in ' .. app.pwd .. '"')
  return {
    { LogSuccess = "pong" },
  }
end

Then it can be called via CallLua: custom.ping.

This works:

```lua
xplr.fn.custom.ping = function(app)
  print("What's your name?")
  local name = io.read()
  os.execute('read -p "Hello ' .. name .. ', you are in ' .. app.pwd .. '"')
  return {
    { LogSuccess = "pong" },
  }
end
```

Then it can be called via `CallLua: custom.ping`.
Make pipe readers and call lua behave in a similar way.
@sayanarijit sayanarijit merged commit bfdb773 into main May 22, 2021
@sayanarijit sayanarijit deleted the add/call-lua branch May 22, 2021 15:38
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

Successfully merging this pull request may close these issues.

None yet

1 participant