Hi all,

I would like to contribute to the Qubes OS project by making proper 
bash-completion of Qubes OS commands (primary for qvm-* commands).
The related issue: https://github.com/QubesOS/qubes-issues/issues/7887

Before doing something I analyzed the existing solutions - mostly this two:
https://github.com/jgriffiths/qubes-completion/blob/master/qvm_completion.sh
https://github.com/Qubes-Community/Contents/blob/master/code/productivity/qvm-cmds-bash-completion.bash

And while both of these solutions are interesting, have different features and 
ideas, they still have major drawbacks and do not fit my high expectations.
I would like to make a better one, taking ideas from these two and best 
practices from bash completion of other GNU/Linux tools.
I would want the new completion to be as clever, advanced and comfortable to 
use as possible.

To achieve it I hope some of devs could answer some technical questions I have.
Starting with these:

1) I see some inconsistencies in `man qvm-clone` maybe because it was generated 
automatically. So, which one is the proper syntax: 
`--pool POOL_NAME:VOLUME_NAME` or 
`--pool=POOL_NAME:VOLUME_NAME`?
Or both are allowed?
The same for `--property` - must it follow with = sign or not?

2) Are names of qubes allowed to start from "-" (I really hope not).

3) What do *-chars in `--property NAME*=*VALUE` mean?

4) Are options really allowed only before VMs's names in commands like 
`qvm-clone` (the `man qvm-clone` says so)?
I would like to respect this strictness in completion to provide the best 
completion experience possible.

5) Is `man qvm-create` broken in the first paragraph of Synopsis? It has 
`qvm-create` the second time on the same line (last one) of the first paragraph.
The `qvm-create --help` does not provide information about the second way of 
calling:
$ qvm-create --help-classes
Bash completion for sure should take all valid options into account.

6) What name would be recommended for this completion in case it goes to qubes 
packages?
I think something like generic `qubes-bash-completion`or `qubes-completion` is 
fine, but different people make different names for it. So, maybe you have 
opinion on that too.

7) Will it be possible and is it desired to add these completions to the 
default Qubes OS packaging system to give them to users out of the box?

-- 
Best regards,
jamke


-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/NJTqEiG--3-9%40tutanota.com.

Reply via email to