Jie*_*eng 3 php windows doctrine cmd
在Windows中,要从任何目录使用doctrine CLI,我需要使用类似的东西
php D:\full\path\to\doctrine\bin\doctrine.php --variables here
Run Code Online (Sandbox Code Playgroud)
无论如何,我可以缩短它,使它成为类似的东西
php doctrine.php --variables here
Run Code Online (Sandbox Code Playgroud)
甚至
doctrine --variables here
Run Code Online (Sandbox Code Playgroud)
尝试 doskey doctrine=php D:\full\path\to\doctrine\bin\doctrine.php $*
那你应该可以做到 doctrine --variables here
如果您不想在每个会话中输入该内容,可以将其导出到文件中:
doskey /macros > macros.txt
Run Code Online (Sandbox Code Playgroud)
并在每个会话中导入:
doskey /macrofile=macros.txt
Run Code Online (Sandbox Code Playgroud)
如果仍然有太多工作,您可以将它们添加到CLI的自动运行条目中:
reg add "hkcu\software\microsoft\command processor" /v Autorun /t reg_sz /d
"%systemroot%\system32\doskey.exe /macrofile=path\to\your\macros.txt"
请注意,通过这样做,您正在修改注册表,因此请谨慎使用.
归档时间: |
|
查看次数: |
2328 次 |
最近记录: |