Last active
August 8, 2017 13:35
-
-
Save raivieiraadriano92/84c9717f6e256873a349b0d611642a61 to your computer and use it in GitHub Desktop.
Linux - custom shell function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Edite o arquivo: | |
~/.bashrc | |
#Adicione as funções desejadas: | |
php() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/var/www jaschweder/php php "$@" | |
} | |
iphp() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/var/www jaschweder/php bash | |
} | |
composer() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src composer/composer "$@" | |
} | |
phpunit() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/var/www -w /var/www jaschweder/php ./vendor/bin/phpunit "$@" | |
} | |
npm() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src monostream/nodejs-gulp-bower npm "$@" | |
} | |
gulp() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src monostream/nodejs-gulp-bower gulp "$@" | |
} | |
bower() | |
{ | |
docker run -it --rm -v $HOME/.ssh:/root/.ssh -v $('pwd'):/usr/src -w /usr/src monostream/nodejs-gulp-bower bower "$@" --allow-root | |
} | |
#Salve o arquivo | |
#Reinicie o serviço: | |
. ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment