Repository navigation
Implement shell completion for +group and ~group - #1842
Conversation
|
It seems that CI is failing because zsh is treating the tilde character '~' in a special way. Edit: seems related to zsh's filename expansion feature. I'm not sure how to get zsh to pass the tilde character through to hydra... |
There was a problem hiding this comment.
I see bash and zsh are different wrt ~ expansion.
bash will fall back to treating ~blah as literal if there is no blah user,
while zsh will give an error.
I.e. bash could start giving errors if there was a ~hydra or ~group user on the system.
I wonder would the most general fix be to quote the ~,
i.e. with \~hydra etc. in the tests to avoid this issue.
One is generally going to need to quote tilde while on the command line anyway.
For bash at least, I never had to quote
Worth a try: |
pixelb
left a comment
There was a problem hiding this comment.
This change is fine in isolation.
The test adjustments can be done separately
This PR adds logic Hydra's shell-completion, handling the cases of '+group' and '~group'.
Closes #1841.
Completions enabled by this PR:
+gro->+group=(just like if no plus is given)+group=->+group=option(just like if no plus is given)+->+group=~gro->~group(note no trailing equal sign)~group=->~group=option(just like if no tilde is given)~->~groupEdit:
I was not able to get the tilde completions ('~group...') working with fish or zsh; those shells have special completion logic for words starting with tilde.