diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-07-02 13:56:38 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-07-02 13:56:38 +0100 |
| commit | 466410529a40b3f673063320965114f1aaa2c7da (patch) | |
| tree | e089abf7a22ba7a3abee16d709c2ba972b6b489d /share | |
| parent | 12dd7b04ac057e95289306dfe88848b73ded0037 (diff) | |
Add a colorscheme command and a first zenburn them in the colors directory
Diffstat (limited to 'share')
| l--------- | share/kak/colors | 1 | ||||
| -rw-r--r-- | share/kak/kakrc | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/share/kak/colors b/share/kak/colors new file mode 120000 index 00000000..daf99fdc --- /dev/null +++ b/share/kak/colors @@ -0,0 +1 @@ +../../colors
\ No newline at end of file diff --git a/share/kak/kakrc b/share/kak/kakrc index 38a15b8f..e588fd48 100644 --- a/share/kak/kakrc +++ b/share/kak/kakrc @@ -30,6 +30,23 @@ def -shell-params runtime %{ %sh{ done }} +def -shell-params -docstring "colorscheme <name>: enable named colorscheme" \ + -shell-completion %{ + prefix=${1:0:${kak_pos_in_token}} + ( + for col in ${kak_runtime}/colors/*.kak; do + expr $(basename "${col}" .kak) : "^\(${prefix}.*\)$" + done + ) | grep -v '^$' + } \ + colorscheme %{ %sh{ + if [ $# -eq 1 ]; then + echo "source '${kak_runtime}/colors/$1.kak'" + else + echo -color Error 'Usage: colorscheme <scheme name>' + fi +}} + %sh{ autoload() { dir=$1 |
