Use command line aliases for faster command typing. For example, after installing command line aliases, you can compile the application using
osmc Osm_App
instead of verbose
php vendor/osmphp/core/bin/compile.php Osm_App
Add the following lines to the end of your ~/.bashrc
file:
alias osmc='php vendor/osmphp/core/bin/compile.php'
alias osmh='php vendor/osmphp/core/bin/hint.php'
alias osmt='php vendor/osmphp/framework/bin/tools.php'
alias osm='php vendor/osmphp/framework/bin/console.php'
-
Create a directory, for example
C:\osm
and extract all the files from this Git repository. -
Add
C:\osm\windows-aliases-0.1
directory to thePATH
system environment variable:- Press Windows button to open the Windows Start menu.
- Type
env
, and openEdit the system environment variables
window. - Click the
Environment variables
button. - In the
System variables
(the second one) section, double-click thePath
variable. - Using the
New
button, addC:\osm\windows-aliases-0.1
directory. - Click
OK
button in all three opened modal windows.
Use osm
alias for running commands of the main application, for example, for running the database migrations:
osm migrate:up
Explore all the commands by running osm
alias without parameters:
osm
Explore arguments and options of a specific command using -h
switch:
osm migrate:up -h
Use osmc
alias for compiling an application. For example, compiling the main application:
osmc Osm_App
Use osmh
alias for generating a hint files that enable better navigation and code completion in PhpStorm:
osmh Osm_App
Use osmt
alias for running other command-line tools, for instance, for generating boilerplate code.
Just as with osm
, explore its commands, their arguments and options by running
osmt