bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

Add a postfix opt to _known_hosts_real

Open lonyai opened this issue 6 years ago • 3 comments
trafficstars

I create an opt like -c because I like develop an ansible bash_completion file. And the colon suffix is required to ansible's inventory opts.

lonyai avatar Mar 28 '19 11:03 lonyai

Could you elaborate on your use case more? You mention needing a colon suffix, but we already have the -c option which adds a colon suffix. Note also that you can add some other suffix to completions using for example something like this (adds a comma, add compopt -o nospace if you want it):

    _known_hosts_real -- "$cur"
    COMPREPLY=( $( compgen -S , -W '${COMPREPLY[@]}' -- "$cur" ) )

scop avatar Apr 07 '19 05:04 scop

It's may be beautiful in one-liner.

lonyai avatar Apr 08 '19 14:04 lonyai

What about the colon, we already have -c which adds it, and you mentioned that's what your completion requires?

scop avatar Apr 10 '19 05:04 scop