Awesome Open Source
Awesome Open Source

zabrze

ZSH abbreviation expansion plugin

Usage

# ~/.config/zabrze/config.yaml
abbrevs:
  # abbrev alias
  - name: git
    abbr: g
    snippet: git

  # global abbrev
  - name: '>/dev/null'
    abbr: null
    snippets: '>/dev/null'
    global: true

  # global abbrev with context
  - name: git commit -m
    abbr: cm
    snippet: commit -m
    global: true
    context: '^git\s'

  - name: branch name
    abbr: B
    snippet: $(git symbolic-ref --short HEAD)
    evaluate: true
    global: true
    context: '^git\s'
$ eval "$(zabrze init --bind-keys)"

then

$ g<SP>cm<SP>
#   expanded
$ git commit -m 

$ git show B<CR>
#   expanded
$ git show main

Installation

From prebuilt binary

You can download a binary release here.

zinit

zinit blockf light-mode as"program" from"gh-r" for \
    atload'eval "$(zabrze init --bind-keys)"' \
    Ryooooooga/zabrze

Cargo

$ cargo install zabrze

Alternatives


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Rust (63,975
Zsh (3,230
Zsh Plugin (339
Related Projects