Code Monkey home page Code Monkey logo

zinit-console's Introduction

Zinit Console

A consolette for Zinit – based on the zsh/zcurses Zshell module and the ZUI library – it allows the user to:

  • view the currently loaded plugins in a colorful list, in one of 3 different display modes,
  • unload and load plugins,
  • delete the plugins and snippets from the disk.

Usage

Start the consolette by Ctrl-O Ctrl-J keyboard shortcut, or by running ziconsole function in the shell. Then, in the consolette:

Key(s) Description
Ctrl-U,Ctrl-D Half page up; half page down
Ctrl-P,Ctrl-N Previous line, centered; next line, centered
Ctrl-L Redraw of whole display
[, ] Jump to next and previous section (e.g.: next plugin or snippet)
g, G Jump to beginning and end of whole interface
<,> or {,} Horizontal scroll (i.e.: left or right)
/ 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)

Screencast

asciicast

Installation

Load like any other normal plugin, e.g.:, with use of Turbo mode and the for-syntax:

zinit wait lucid for zinit-zsh/zinit-console

The plugin needs zsh/curses Zsh module. You can check if it's available to your Zsh by executing:

zmodload zsh/curses

If the call will return an error, then the zsh/curses module isn't available.

Solving The Lack Of zsh/curses Module With Zinit

You can build the zsh/curses-equipped Zshell with Zinit by the following command:

zinit ice id-as"zsh" atclone"./.preconfig
        CFLAGS='-I/usr/include -I/usr/local/include -g -O2 -Wall' \
        LDFLAGS='-L/usr/lib -L/usr/local/lib' ./configure --prefix='$ZPFX'" \
    atpull"%atclone" run-atpull make"install" pick"/dev/null"
zinit load zsh-users/zsh

The command will build a custom zsh and install it under $ZPFX (~/.zinit/polaris by default). The path $ZPFX/bin is already added to $PATH by Zinit at first position, so starting zsh will run the new Zshell.

When on Gentoo, and possibly other systems, the zsh can still not have the ncurses library linked. To address this, utilize the z-a-patch-dl annex and automatically patch the source first:

zinit light zinit-zsh/z-a-patch-dl
zinit ice id-as"zsh" atclone"./.preconfig
        CFLAGS='-I/usr/include -I/usr/local/include -g -O2 -Wall' \
        LDFLAGS='-L/usr/lib -L/usr/local/lib' ./configure --prefix='$ZPFX'" \
    dl"https://gist.githubusercontent.com/psprint/2373494c71cb6d1529344a2ed1a64b03/raw -> curses.patch" \
    patch'curses.patch' atpull"%atclone" reset \
    run-atpull make"install" pick"/dev/null"
zinit load zsh-users/zsh

Then, to update, rebuild and reinstall the zsh, you can do zinit update zsh. The binary can be safely copied over /bin/zsh as it has paths to all needed directories built-in.

zinit-console's People

Contributors

psprint avatar pschmitt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.