How to add $desc
for alias?
#395
Replies: 1 comment
-
okay I found the group thing... see master...oldfatcrab:fzf-tab:master |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was wondering how/where I can add $desc for alias.
Below is tl;dr
I'm sometimes frustrated when using the git alias, there are too many g... alias I can choose (i.e. alias gpsup="git push --set-upstream origin $(git_current_branch)").
Attempt 0
I tried to just print it to the preview part using
alias $word
but it seems like it is loading a new session and won't load the alias.So this approach won't work...
Attempt 1
Also tried to add some handling in fzf-tab.zsh#L77 but uncertain how I can access the
$group
info for eachword
orhit
I can use the external command
type
to have it implemented in a quick-and-dirty way, but the performance must be poor --> refer to this diffclick below for quick demo:
with a list of
$__group
will be much efficientAttempt 2
Looked around the code to find where the descriptions are loaded/generated (seems it is generated from
man
for subcommands or--help
for options) but no luck. I think this description is generated from somewhere else (i.e. not infzf-tab
)?Any comments for attempt 1 and 2 and/or other approaches are welcome.
Thanks in advance,
Beta Was this translation helpful? Give feedback.
All reactions