zsh-autocomplete icon indicating copy to clipboard operation
zsh-autocomplete copied to clipboard

Show alias values

Open PROxZIMA opened this issue 1 year ago • 2 comments

What do you want?

Option to expand all the aliases which are provided in the suggestions.

Why do you want this?

Here I've set some git aliases in a file and I've sourced them in .zshrc. After hitting the tab I'm getting the aliases as my suggestions.

Screenshot from 2021-11-26 23-36-03

Is there any way to expand those suggestions(aliases) then and there only? Something like this.

 ╭─proxzima@proxzima in ~ via  v3.9.5 took 87ms [ 100%]
 ╰─☣ gb
alias
gb: aliased to git branch
gba: aliased to git branch -a
gbd: aliased to git branch -d
gbD: aliased to git branch -D
gbm: aliased to git branch -m
gbM: aliased to git branch -M
gbnm: aliased to git branch --no-merged
gbr: aliased to git branch --remote
gbl: aliased to git blame -b -w
gbsb: aliased to git bisect bad
gbsg: aliased to git bisect good
gbsr: aliased to git bisect reset
gbss: aliased to git bisect start

I'm familiar with the _expand_alias flag but it provides alias expansion in the command line but not in the suggestions. My concern is related to alias expansion in the suggestions.

Who else would benefit from this?

All those who are using the omz's git plugin as it provides lots of git related aliases.

How should it work?

A flag that can enable/disable this feature.

Given the following situation:

  • If the flag is enabled then the output can be similar to the one mentioned above.
  • If the flag is disabled then there will be no change in the output.

PROxZIMA avatar Dec 31 '22 14:12 PROxZIMA

Good idea. I will probably implement this in Zsh upstream, not here, but I'll keep this issue open until I have.

marlonrichert avatar Apr 05 '23 08:04 marlonrichert

any news here? I'd love to see this feature!

Myzel394 avatar Feb 09 '24 21:02 Myzel394