stecman / symfony-console-completion

Automatic tab-key completion for Symfony console application options, arguments and parameters
MIT License
420 stars 26 forks source link

Support for fish shell #89

Open Radiergummi opened 4 years ago

Radiergummi commented 4 years ago

As it seems, you don't currently support auto-completion for the fish shell. Fish is a well-established shell by now, I think (are there any statistics on shell usage?), so it'd make sense to add support.

I've just stumbled across this problem, but I really like your approach and would like to contribute a PR if there is any interest in supporting fish. As far as I've seen, both bash and zsh are implemented as string variables in the HookFactory currently.
Would it make sense to outsource this into a more generic Hooks\${ shellName }Factory approach?

stecman commented 4 years ago

Happy to have Fish support added :+1:

CompletionCommand:: escapeForShell is probably in the wrong place responsibility-wise, so splitting out each supported shell into its own class sounds like a good direction.

Radiergummi commented 4 years ago

awesome :+1:
I'll see what I can come up with.