Closed pocketken closed 2 years ago
@dsherret hmm; I am getting different behavior when I run this locally in Windows. Both the original and modified version pass here, which now that I think about it noThrow()
would in fact, not throw...
I need another coffee.
It's probably finding a cd
command on mac (via resolveCommand
)
It's probably finding a
cd
command on mac (viaresolveCommand
)
Of course it is! ..fires up mac..
$ which cd
/usr/bin/cd
$ which echo
/bin/echo
$ which export
$
export
wins! I'll update.
👍 no problem, glad to contribute back where I can.
Thanks again for throwing this together!
Thanks again for this and all your other PRs! I released version 0.8.0.
As mentioned in #7, it'd be nice to extend the shell parser to be able to handle additional commands as though they were built-ins/in the system path. Here's a quick take at implementing support by means of extending the
CommandBuilder
with ahandle()
method for registering a custom command handler/callback. This should fit in nicely with the custom builder pattern outlined in the documentation.PR is not so much WIP as at a point where I could use some feedback:
handle
, butcommand()
is obviously taken andcustomCommand()
didn't feel right either.Record<string, CustomCommandHandler>
?