coming back to this (the question whether or not there are `fossil' options like `--user'). my interest in this question is related to this project

http://fossil.0branch.com/fsl

where the wrapper script `fsl' which can be used as a transparent drop-in replacement for the `fossil' command (and makes live with fossil on the command line much easier: alias mechanism, output filtering etc.) of course needs to know the syntax accepted by `fossil' on the command line:

by try and error (no documentation whatsoever...) I found out that both these commands work:

fossil --user joedoe ci filename

fossil ci --user joedoe filename

the second version looks "normal" in that `ci' apparently takes a `--user' option plus argument. the first one is the "problem" for the `fsl' wrapper since it of course cannot (and should not need to) mimic the complete command line parsing of `fossil' in order to get it correctly interpreted. so this wrapper (and any other, I'd say) relies on the assumption that the command line syntax is the one stated by `fossil' when called without args

fossil COMMAND ...

so that the wrapper can take action depending on the identified COMMAND (being on position one of the list of arguments).

bottom line: I really would be grateful if someone could clarify whether

fossil COMMAND ?args and files?

is actually the only "valid" syntax for command line usage (ignoring the `--args FILENAME' way of feeding `fossil' commands from a file)
and that things like

fossil --user joedoe ci filename

are not guaranteed to work/should be avoided?

thanks in advance
joerg


On Thu, 08 Aug 2013 17:00:08 +0200, Stephan Beal <sgb...@googlemail.com> wrote:

On Thu, Aug 8, 2013 at 2:32 PM, Stestagg <stest...@gmail.com> wrote:

I would agree here, it's not at all clear. Even when you know there is a
--user option, then the fossil output isn't clear:


In Fossil's defense: i've been using Fossil almost daily since Christmas
2007 and haven't every used --user.

steves@sapphire ~> f --user foo
fossil: fossil: unknown command: --user
fossil: use "help" for more information


IIRC, only commands which use user details (e.g. a commit or tag)
allow/user a user override option. Most locally-run commands don't care who
you are.


# So the first argument must be the command?

steves@sapphire ~> f --user foo ls
fossil: current directory is not within an open checkout


Unfortunately, that depends on the exact command :/. Side effects of the
argument resolution process change (potentially) in what order some code
must be run. i don't recall off-hand whether the top-level command
dispatcher skips over --flags, but i don't see how it could because it
cannot generically know if the token after a -flag is the value for the
flag or if it is a command (unless it looks up the argument in its command
table).

i'm not in any way discounting your arguments that the help could be
clearer/more intuitive in places, but some of the current behaviours are
side effects of old design decisions which cannot simply be swapped out.

Feel free to propose new/improved help texts :).



--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to