Conversation
|
I can test zsh. And I like the idea of what GitHub's CLI recommends – adding the But there are way more commands and arguments, I agree it may not be necessary here. We can at least borrow the zsh bit https://github.com/platformsh/platformsh-cli/blob/master/src/Command/CompletionCommand.php And the installation bit: |
|
Yes, If you're not able to get all of this patch into the next release, it would be nice if at least the complete command is included. |
|
I'm cool with getting this in. Should there just be an The setup command could be useful in the feature, like storing your Drupal.org username and uid for other things. |
|
The problem with using If we decide to use I'm fine with either way. |
|
@hansfn want to just add README instructions for the current state and I'll merge it up? |
|
I have updated the readme. Maybe we should say something about this not working with phar installation? I was hesitant to do it because we say that composer installation is deprecated. (Ref #40.) |
|
We can handle phar in follow up, or as I say, let bug reports drive the roadmap |
This is a minimal implementation which only completes the actual commands. However, new commands are automatically available for completion - no hard-coded list of command names are used. And supporting global options is easy, but handling options for each command is more work.
I was planning to add instructions to the README about sourcing drupalorg-cli-completion.sh (or adding/linking it to
/etc/bash_completion.d/but that file might not be available when installing as phar? Hm. Maybe we should do as the Github shell - refgh completion --shell bash- add a command that just echos the file so it works for phar installs too? I'm using cgr for Composer installation so I didn't think about this problem before now ...It should be noted that the package stecman/symfony-console-completion provides "automatic tab-key completion for Symfony console application options, arguments and parameters" but I think it's bloated for our need.
And finally: I'm not using Zsh so I haven't tried to support it, but it might not be much work.
PS! Creating this patch took me longer than anticipated because of the colons in the commands names - colons are breakwords in Bash. The solution was easy enough.