momo-lab / zsh-abbrev-alias

This zsh plugin provides functionality similar to Vim's abbreviation expansion.
MIT License
119 stars 14 forks source link

Recursive alias expansion #16

Closed jtyers closed 3 years ago

jtyers commented 3 years ago

First off, great project! Really appreciate the benefits of doing alias expansion as I type.

I make lots of use of aliases-in-aliases. For example, in my .zshrc:

abbrev-alias D='docker'
abbrev-alias Dr="D run --rm -it"

Here, if I type D, it expands correctly. However, when I type Dr, it only expands one level deep, i.e. D run --rm -it. It'd be great if the expansion happened recursively so that this became docker run --rm -it.

momo-lab commented 3 years ago

I supported recursive option(-r). Please try it.

jtyers commented 3 years ago

Nice one - this works really well. Thanks :-D

jtyers commented 3 years ago

Could you merge to master?

momo-lab commented 3 years ago

Already merged. Thank you for closing.