[pve-devel] Suggest hostnames in bash completion

Dietmar Maurer dietmar at proxmox.com
Mon Jul 18 16:31:42 CEST 2016


> Thank you for your pointers.
> 
> I'll make sure to post a patch if/when I get something decent running.
> 
> > completion already feels a bit sluggish
> 
> I agree. In fact, I'm wondering if it wouldn't be more useful for me to
> rewrite the completion code as native Bash functions, with as few external
> calls as possible. Most other packages do this.

Using bash is clumsy, because you cannot use the existing libraries. Instead,
I suggest to use API calls, maybe using curl or wget? This would avoid the
perl startup overhead. (maybe we need to adopt the http server to be able to
return a suitable text format).

Or simply startup the binary which listens on a local socket to do 
the command line completion (when started with "<cmd> bashcomplete").
Such server can exit after some idle timeout.

Not sure what is easier to implement, but both solution should provide
some speedup...




More information about the pve-devel mailing list