mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Add usage info to alias-finder README.md
Being new to ohmyzsh it wasn't immediately obvious to me what this plugin did or how to use it. I've added some examples to hopefully make it more obvious to future readers.
This commit is contained in:
parent
8908e6d720
commit
403cf615bf
1 changed files with 36 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This plugin searches the defined aliases and outputs any that match the command inputted. This makes learning new aliases easier.
|
||||
|
||||
## Usage
|
||||
## Setup
|
||||
|
||||
To use it, add `alias-finder` to the `plugins` array of your zshrc file:
|
||||
```
|
||||
|
|
@ -22,6 +22,41 @@ zstyle ':omz:plugins:alias-finder' cheaper yes # disabled by default
|
|||
|
||||
As you can see, options are also available with zstyle.
|
||||
|
||||
## Usage
|
||||
|
||||
When you execute a command alias finder will look at your defined aliases and suggest shorter aliases you could have used, for example:
|
||||
|
||||
Running the un-aliased `git status` command:
|
||||
```sh
|
||||
╭─tim@fox ~/repo/gitopolis ‹main›
|
||||
╰─$ git status
|
||||
|
||||
gst='git status' # <=== shorter suggestion from alias-finder
|
||||
|
||||
On branch main
|
||||
Your branch is up-to-date with 'origin/main'.
|
||||
nothing to commit, working tree clean
|
||||
```
|
||||
|
||||
Running a shorter `git st` alias from `.gitconfig` that it suggested :
|
||||
```sh
|
||||
╭─tim@fox ~/repo/gitopolis ‹main›
|
||||
╰─$ git st
|
||||
gs='git st' # <=== shorter suggestion from alias-finder
|
||||
## main...origin/main
|
||||
```
|
||||
|
||||
Running the shortest `gs` shell alias that it found:
|
||||
```sh
|
||||
╭─tim@fox ~/repo/gitopolis ‹main›
|
||||
╰─$ gs
|
||||
# <=== no suggestions alias-finder because this is the shortest
|
||||
## main...origin/main
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
### Options
|
||||
|
||||
> In order to clarify, let's say `alias a=abc` has source 'abc' and destination 'a'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue