Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

kakounedotcom/prelude.kak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

prelude.kak

Prelude of shell blocks for Kakoune.

Installation

Add prelude.kak to your autoload or source it manually.

require-module prelude

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:

evaluate-commands %sh{
  . "$kak_opt_prelude_path"
  kak_escape evaluate-commands -try-client "$kak_client" 'echo Tchou' | kak -p "$kak_session"
}

Releases

No releases published

Packages

No packages published

Languages