Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
Nov 11, 2020
Nov 24, 2016
Feb 13, 2021

zsh-abbrev-alias

This zsh plugin provides functionality similar to Vim's abbreviation expansion.

This plugin consulted http://zshwiki.org/home/examples/zleiab .

See https://github.com/momo-lab/bash-abbrev-alias for bash version.

Installation

Using zplug

zplug "momo-lab/zsh-abbrev-alias"

Alias settings are written after zplug load.

For Example

$ abbrev-alias -g G="| grep"
$ ps aux G<push space key>
->
$ ps aux | grep 
$ git branch
* master
$ abbrev-alias -ge B='$(git symbolic-ref --short HEAD 2> /dev/null)'
$ git push origin B<push space key>
->
$ git push origin master 
$ abbrev-alias d='docker'
$ d<push space key>
->
$ docker
$ abbrev-alias -r dr='d run --rm -it'
$ dr<push space key>
->
$ docker run --rm -it

Notes

This plugin is compatible with https://github.com/MichaelAquilina/zsh-you-should-use, you only need to source it first

Help

Show abbrev-alias --help.

$ abbrev-alias --help
abbrev-alias 0.3.0
usage: abbrev-alias [OPTIONS] {name=value ...}
       abbrev-alias -u {name ...}
       abbrev-alias --init

sptions:
  -c, --command   register as 'alias name=value'
  -g, --global    register as 'alias -g name=value'
  -e, --eval      evaluates subshells on expansion
  -r, --recursive expand aliases recursively
  -u, --unset     unregister alias
  -i, --init      initialize abbrev-alias. execute with .zshrc
  -h, --help      show this help
  -v, --version   show version

About

This zsh plugin provides functionality similar to Vim's abbreviation expansion.

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages