summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlex Leferry 2 <alexherbo2@gmail.com>2020-03-15 14:08:32 +0100
committerAlex Leferry 2 <alexherbo2@gmail.com>2020-03-15 14:10:13 +0100
commit05b2642b1e014bd46423f9d738cc38a624947b63 (patch)
tree281f1a5d2d0a842126c581ab5fb360f876cd477f /README.md
Initial commit
Diffstat (limited to 'README.md')
-rw-r--r--README.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..60e1749
--- /dev/null
+++ b/README.md
@@ -0,0 +1,33 @@
+# prelude.kak
+
+Prelude of shell blocks for [Kakoune].
+
+## Installation
+
+Add [`prelude.kak`](rc/prelude.kak) to your autoload or source it manually.
+
+## Usage
+
+```
+kak_escape [text…]
+```
+
+Similar to `shell_escape` you may find in other programming languages,
+`kak_escape` escapes each argument so that it can be safely passed to Kakoune.
+
+**Implementation**:
+Single quotes each argument and doubles the single quotes inside.
+
+**Note**:
+The resulted text should be used unquoted and is not intended for use in double quotes, nor in single quotes.
+
+**Example**:
+
+``` kak
+evaluate-commands %sh{
+ . "$kak_opt_prelude"
+ kak_escape evaluate-commands -try-client "$kak_client" 'echo Tchou' | kak -p "$kak_session"
+}
+```
+
+[Kakoune]: https://kakoune.org