Closed l3nz closed 5 years ago
I've got a branch that does:
[jason@penguin toycalc]$ clj -m toycalc add -a 40 -b 2
42
[jason@penguin toycalc]$ clj -m toycalc aad -a 40 -b 2
** ERROR: **
You called aad, did you mean to call add?
[jason@penguin toycalc]$ clj -m toycalc zoo -a 40 -b 2
** ERROR: **
Unknown sub-command
....
I'm going to tidy it up a bit, before I open a PR. In the future it could probably be modified to give the option of running the updated command with the given args....
Looks yummy! maybe I'quote the subcommand, like:
You called subcommand 'aad', did you mean to call 'add'?
So they stand out a bit more.
This is what git would do:
$ git commit-m "...."
git: 'commit-m' is not a git command. See 'git --help'.
The most similar command is
commit-tree
I saw PR #49 - not sure if I'm merging or doing it manually, but thanks. I think it rocks! 🥇
Yea, I'm starting a new job, so time is short. But I got all the functionality in, IIRC, I just thought it needed a bit of polishing.
On Thu, Nov 15, 2018 at 5:36 AM lenz notifications@github.com wrote:
I saw PR #49 https://github.com/l3nz/cli-matic/pull/49 - not sure if I'm merging or doing it manually, but thanks. I think it rocks! 🥇
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/l3nz/cli-matic/issues/26#issuecomment-439042117, or mute the thread https://github.com/notifications/unsubscribe-auth/AADovBjPeyU7j3t3eLaEH5FKyG0_sKUEks5uvW3egaJpZM4U_45p .
This is fixed in 0.2.5 - try it! 😃
It would be nice to detect mis-spellings and suggest alternatives. Something similar happens in
clj-sub-command
.See https://crossclj.info/fun/clj-sub-command.core/candidates.html
For example what git does is: