Skip to content

Instantly share code, notes, and snippets.

@raulneis
Last active October 17, 2018 13:46
Show Gist options
  • Save raulneis/4085f23a35d4ac18568fb6d373056246 to your computer and use it in GitHub Desktop.
Save raulneis/4085f23a35d4ac18568fb6d373056246 to your computer and use it in GitHub Desktop.
Symfony console command shortcut
#!/bin/bash
#
# Instead of the `php bin/console` or `php app/console`, just type `sf`.
# Place this file in your ~/bin directory or include it in your path.
#
FILE=$(readlink -f ./bin/console)
if [ -f $FILE ]; then
php $FILE $@
else
FILE=$(readlink -f ./app/console)
if [ -f $FILE ]; then
php $FILE $@
else
echo "Not a Symfony directory"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment