Using PHP CLI doctrine easily in windows

in windows, to use the CLI doctrine from any directory, I need to use something like

php D:\full\path\to\doctrine\bin\doctrine.php --variables here

In any case, I can shorten this so that it becomes something like

php doctrine.php --variables here

or even

doctrine --variables here
+3
source share
1 answer

Try doskey doctrine=php D:\full\path\to\doctrine\bin\doctrine.php $*

Then you can do doctrine --variables here

If you do not want to enter this from each session, you can export it to a file:

doskey /macros > macros.txt

And import it every session:

doskey /macrofile=macros.txt

And if this is still too much, you can add them to the Autorun entry for the CLI:

reg add "hkcu\software\microsoft\command processor" /v Autorun /t reg_sz /d "%systemroot%\system32\doskey.exe /macrofile=path\to\your\macros.txt"

Please note that you are modifying your registry, so be careful.

+5
source

Source: https://habr.com/ru/post/1755082/


All Articles