diff options
author | siduck <siduck@tutanota.com> | 2022-10-19 06:12:55 +0530 |
---|---|---|
committer | siduck <siduck@tutanota.com> | 2022-10-19 06:12:55 +0530 |
commit | c5a0b70ebb2342d1d8bbf2b72ec1cae41d84b6e9 (patch) | |
tree | 2a816edb99631ce029332f16d2cb05441fd9e714 /README.md | |
parent | Merge pull request #19 from musjj/patch-1 (diff) |
add basic docs for send function
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -105,6 +105,20 @@ require("nvterm.terminal").new "horizontal" require("nvterm.terminal").new "vertical" ``` +#### Send commands to the terminal + +```lua + require("nvterm.terminal").send(" your command ", "horizontal|vertical|float") -- the 2nd argument i.e direction is optional +``` + +- This function will first open a horizontal terminal and then run the `node test.js` command +- Whenever you re-run this function, it'll just run that command in that horizontal terminal. +```lua +function() + require("nvterm.terminal").send("node test.js", "horizontal") +end, +``` + ### Additional Functionality NvTerm provides an api for you to send commands to the terminal. You can create different ones for different filetypes like so: |