Fossil User Forum

"Command is ambigous" message for the same command
Login

"Command is ambigous" message for the same command

"Command is ambigous" message for the same command

(1) By KIT.james (kjames3411) on 2022-04-05 15:57:43 [source]

Bug or feature, you tell me!

$ fossil rem
fossil: ambiguous command prefix: rem
fossil: could be any of: remote remote-url
fossil: use "help" for more information

(2) By Larry Brasfield (larrybr) on 2022-04-05 16:46:02 in reply to 1 [link] [source]

I would say "both" depending on the definition of "bug". It's a feature that a subcommand which resolves to multiple names is not just detected -- the candidates are listed. Nice.

It is certainly an improvement opportunity for the subcommand resolver to discern that the candidates are all aliases for each other. I don't think I would insist that it is a bug, though.

(3) By Martin Gagnon (mgagnon) on 2022-04-05 17:03:17 in reply to 1 [link] [source]

Here's a fix attempt: https://www.fossil-scm.org/home/timeline?r=ambiguous_cmd_fix

It's on a branch because I don't know all the peculiarities of the command dispatch logic.

Another small inconsistency with the this ambiguous command check remain:

If a command is "ambiguous" with a setting and another command, it will be reported in the list of ambiguous commands.

example:

$ fossil re
fossil: ambiguous command prefix: re
fossil: could be any of: rebuild reconstruct redirect-to-https redo relative-paths remote remote-url rename reparent repo-cksum repolist-skin revert
fossil: use "help" for more information
$ fossil red
nothing to redo

redirect-to-https is listed when trying trying re, but it's a setting.

when trying with red, it resolve to redo, so it seems to correctly not considering the setting as ambiguous when there's no other ambiguous commands.

(4) By Martin Gagnon (mgagnon) on 2022-04-05 19:54:23 in reply to 3 [link] [source]

If a command is "ambiguous" with a setting and another command, it will be reported in the list of ambiguous commands.

This case is also fixed now (on the same branch).

Waiting approval to merge in trunk.

(5) By Stephan Beal (stephan) on 2022-04-06 01:01:43 in reply to 1 [link] [source]

Bug or feature, you tell me!

Overall a feature, but when Richard first added the stash command, my muscle memory of typing sta for status was broken, causing no small amount of finger retraining.

(6) By Marcelo Huerta (richieadler) on 2022-04-06 16:50:08 in reply to 5 [link] [source]

when Richard first added the stash command, my muscle memory of typing sta for status was broken, causing no small amount of finger retraining.

For me it was f cha for fossil changes when the chat command was added...