Provide a symfony2 console function sf
with tab completion for fish shell and sf-init
function for project creation
Run the below command if you trust me :)
curl -L https://github.com/mojoLyon/fish-sf/raw/master/tools/install.fish | fish
1/ Clone the repository :
git clone git://github.com/mojoLyon/fish-sf.git ~/.fish-sf
2/ Setting required directories
mkdir -p ~/.config/fish/functions
mkdir -p ~/.config/fish/completions
3/ Create symbolic link to function and completion
ln -s ~/.fish-sf/functions/sf.fish ~/.config/fish/functions/sf.fish
ln -s ~/.fish-sf/completions/sf.fish ~/.config/fish/completions/sf.fish
Some tab completion are only available when you are in a symfony directory, just type sf
followed by double tab to get completion.
Completion for symfony builtin command below and custom command.
- Cache
- cache:clear
- cache:warmup
- assetic:dump
- --watch
- assets:install
- --symlink
- config:dump-reference with completion of bundle
- container:debug and debug:container with completion of services
- --tags
- --tag with tag completion
- --parameters
- --parameter
- router:debug and debug:router with completion of route name
- router:dump-apache
- --base-uri
- router:match
- server:run
- --docroot
- --router
- translation:update
- --prefix
- --force
- --clean
- --output-format
- --dump-messages
- twig:lint and lint:twig with file filtering
- generate:bundle
- --no-interaction
- --namespace
- --dir with directories completion
- --bundle-name
- --format with format suggestion
- --structure
- generate_controlle
- --no-interaction
- --controller
- --route-format with format suggestion
- --template-format with format suggestion
- --actions
- generate:doctrine:crud and alias doctrine:generate:crud
- --entity
- --route-prefix
- --with-write
- --format with format suggestion
- --overwrite
- generate:doctrine:entity and alias doctrine:generate:entity
- --no-interaction
- --entity
- --fields
- --format with format suggestion
- --with-repository
- generate:doctrine:entities and alias doctrine:generate:entities
- --path with directories completion
- --no-backup
- server:start
- --docroot
- --router
- server:stop
- server:status
- security:encode-password
- --empty-salt
- security-check
- lint:yaml and yaml:lint with yaml file completion
- acl:set
- --user
- --role
- --class-scope
- twig:debug and debug:twig
- debug:translation and translation:debug
- --domain
- --only-missing
- --only-unused
- debug:event-dispatcher with event name completion
- --format
- debug:config and config:debug with bundle completion
- init-acl
Initialize a symfony2 project with composer and set premissions for app/cache
and app/logs
with chmod or setfacl.
Composer must be in your $PATH to use this function and script may ask you for sudo password for setting acl.
sf-init [options] [path]
- -h, --help : Print usage
- -l, --last-release : install symfony last release
By default, the script install the long time support version of symfony. If the path is not supplied, the project will be created in the current directory.