DEV Community

Cover image for ⚙️ ❮ ZI Crasis ❯
Sall
Sall

Posted on • Updated on • Originally published at github.com

⚙️ ❮ ZI Crasis ❯

Logo

https://z.digitalclouds.dev | GitHub | Twitter | Join the team


Introduction

Crasis – semigraphical interface to ZI

Zsh exposes its parser via (z) substitution flag.

Parsing .zshrc is totally possible.

This way Crasis lets you edit your ZI commands located in .zshrc.

All in pure Zshell code.

No more commenting-out a line with a text editor to disable plugin, cluttering .zshrc, now you can just press a button.

asciicast

Crasis uses pure-Zshell ZUI library to create ncurses interface.

Installation & Basic Use

Install ZI and add following commands to .zshrc:

zi light z-shell/zui
zi light z-shell/zi-crasis
Enter fullscreen mode Exit fullscreen mode

To use, invoke crasis [optional zshrc path] or press Ctrl-o-k.

Global variables CRASIS_THEME and CRASIS_LAYOUT can be used to override configuration file crasis.conf (located in plugin's
tree), i.e.:

CRASIS_THEME="zdharma-256" CRASIS_LAYOUT="contract" crasis
Enter fullscreen mode Exit fullscreen mode

256-color themes require Zsh 5.3 or later.

Key Bindings

Key(s) Description
<,> or {,} Horizontal scroll (i.e. left or right)
Ctrl-L Redraw of whole display
Ctrl-U Half page up
Ctrl-D Half page down
Ctrl-P Previous line, centered
Ctrl-N Next line, centered
[, ] Jump to next and previous section (e.g. next plugin or snippet)
g, G Jump to beginning and end of whole interface
/ Show incremental search
F1 Jump to result (in incremental search) and back
Esc Exit incremental search, clearing query
Ctrl-W Delete whole word (in incremental search)
Ctrl-K Delete whole line (in incremental search)
Up and down Resize text field when editing it (e.g. to make the text fit in)

Screenshots

clean-256

zdharma-256

Code Documentation

Crasis is a ZUI application.

ZUI is a pure-Zshell library where user generates simple text with hyperlinks, which is then turned into active document with buttons.

Check out Crasis code documentation: Asciidoc, PDF.

Top comments (0)