The Annoyance
Every time I create a new minicli app, I need to edit every mention of minicli to whatever the binary is.
If I want to rename the bin file, I have to edit every single mention of it in the app.
The Solution
- Add a
public readonly string $me to App so now you can call $app->me to get the filename.
- Add a
protected function findBinFileName(): string that will automagically find the filename.
- Call this from within the
App::__construct().
This way, the end-developer can easily do things like echo "{$app->me} commad";. You can't embed method calls into strings like that.
And the developer will never need to automate anything.
The Annoyance
Every time I create a new minicli app, I need to edit every mention of
miniclito whatever the binary is.If I want to rename the bin file, I have to edit every single mention of it in the app.
The Solution
public readonly string $metoAppso now you can call$app->meto get the filename.protected function findBinFileName(): stringthat will automagically find the filename.App::__construct().This way, the end-developer can easily do things like
echo "{$app->me} commad";. You can't embed method calls into strings like that.And the developer will never need to automate anything.