summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Leferry 2 <alexherbo2@gmail.com>2019-04-08 16:06:49 +0200
committerAlex Leferry 2 <alexherbo2@gmail.com>2019-04-08 16:06:49 +0200
commitc5a5154c0b465674792cc995835b842cc86beb0e (patch)
treed8c67a8967e1884b1e24f1a05a844ea15437603b
parentd35b4fbbb160e85bccf94157ccf83856690a5496 (diff)
Add send command
-rw-r--r--README.md1
-rwxr-xr-xrc/commands/buffer2
-rwxr-xr-xrc/commands/send3
3 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 53548d7..35cad51 100644
--- a/README.md
+++ b/README.md
@@ -74,6 +74,7 @@ define-command fzf-buffers %(connect buffer $(buffer | fzf))
- `[e]dit [files]`: Open files in the client from where `:connect` was executed
- `[b]uffer [buffers]`: Get buffer list or open buffers in the client from where `:connect` was executed
- `get {type} {name}`: Get a [value][Expansions] in the client from where `:connect` was executed
+- `send {commands}`: Send commands in the client from where `:connect` was executed
## Options
diff --git a/rc/commands/buffer b/rc/commands/buffer
index 8f70b47..ad82c63 100755
--- a/rc/commands/buffer
+++ b/rc/commands/buffer
@@ -14,7 +14,7 @@ edit() {
for buffer do
commands="buffer %($buffer); $commands"
done
- printf 'evaluate-commands -client %%(%s) %%(%s)' "$KAKOUNE_CLIENT" "$commands" | kak -p "$KAKOUNE_SESSION"
+ send "$commands"
}
main "$@"
diff --git a/rc/commands/send b/rc/commands/send
new file mode 100755
index 0000000..62bec60
--- /dev/null
+++ b/rc/commands/send
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+printf 'evaluate-commands -client %%(%s) %%(%s)' "$KAKOUNE_CLIENT" "$@" | kak -p "$KAKOUNE_SESSION"