On Tue, Feb 27, 2018 at 11:48:41AM +0100, haaber wrote: > > Since Q4 much admin work is done on the command line. So it makes sense > > to learn bash to autocomplete nicely. I tried this in dom0: > > > > _qvm() > > { local cur VMS > > COMPREPLY=() > > cur="${COMP_WORDS[COMP_CWORD]}" > > VMS=`qvm-ls | cut -f1 -d" "| grep -v NAME` > > COMPREPLY=( $(compgen -W "${VMS}" ${cur}) ) > > return 0 > > } > > complete -F _qvm qvm-start > > > > there was a small type (APPVMS <-> VMS) that is not the real problem > here. I corrected it above inside the quote. Bernhard >
Try this: _qvm() { local cur COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" VMS=`qvm-ls --raw-list` COMPREPLY=( $(compgen -W "${VMS}" -- ${cur}) ) } -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20180302092202.xnj6axgizlzautow%40thirdeyesecurity.org. For more options, visit https://groups.google.com/d/optout.