Move it to bash completion scripts directory to be able to autocomplete zf providers and zf provider actions
Enable ItI you want to run it immediately in the same opened shell you can do the following command
Note: It will be automatically available in any new shell.
Custom Providers and Caching
In case you are wondering, I’ve got many projects with many custom providers, will it autocomplete them?
The answer is YES, and it fetches the providers per directory basis. Since the fetching and filtering is a pretty heavy process, it caches the autocompleted options in /tmp/ so that it will only be slow the first time, and then it’s going to be blazing fast.
Clear ZF autocomplete cache for providers and actions
To clear the cache, you will need to delete the cache files in tmp, the following command will do the job for you.
rm"/tmp/"`pwd|sed-e's:/:_:g'`"_actions" && rm "/tmp/"`pwd | sed -e 's:/:_:g'`"_providers"
What we want here is that a user can go to the localized version of the website according to the URL identified, for instance we want the website to load the English locale when we pass a URL like this http://example.tld/eng/Controller/Action
The problem is that while implementing the routes for the language detection, the plugins made a conflict with the rules in the routes file. Language routing is easy but sometimes can be tricky. Read more…