On Sat, 10 Aug 2013, Mark Jenkinson wrote:
> I'm afraid that this is currently a limitation with how the help messages are automatically generated, so this is true for all tools, not just randomise. I'll look into whether we can change this for a future release.
that would be great. Do you think it is more than just
$> git diff src/utils/functions.cc
diff --git a/src/utils/functions.cc b/src/utils/functions.cc
index 3303250..e4612fe 100644
--- a/src/utils/functions.cc
+++ b/src/utils/functions.cc
@@ -195,22 +195,22 @@ namespace Utilities {
// return os << "\t" << o.key() << "\t" << o.help_text();
// }
// }
+
+ bool is_short_form(const string& s)
+ {
+ return (s.substr(0,2) != "--");
+ }
void BaseOption::usage(ostream& os) const {
string test(help_text());
if ((test.length()>=1) && (test[0]=='~')) {
- test[0]=' ';
+ test[0] = (is_short_form(key()) ? ' ' : '=');
os << "\t" << key() << test;
} else {
os << "\t" << key() << "\t" << help_text();
}
}
- bool is_short_form(const string& s)
- {
- return (s.substr(0,2) != "--");
- }
-
/*
@return first short-form key (if any)
Seems to work for me on a quick try
> On 10 Aug 2013, at 00:55, Yaroslav Halchenko <[log in to unmask]>
> wrote:
> > Thank you Mark for your superfast reply -- it resolves the issue for me...
> > But am I taking your reply correct that output of randomize --help "isn't
> > right" either and lacking '=' signs? ;)
> > $> randomise --help 2>&1 | grep -e '--.*<'
> > --effective_design <design2.mat> alternative design for determining valid permutations
> > --seed <seed> specific integer seed for random number generator
> > --tfce_H <H> TFCE height parameter (default=2)
> > --tfce_E <E> TFCE extent parameter (default=0.5)
> > --tfce_C <C> TFCE connectivity (6 or 26; default=6)
> > Have a wonderful weekend?
> > On Fri, 09 Aug 2013, Mark Jenkinson wrote:
> >> Hi,
> >> It isn't right. From the "How do I get my command line to run?" entry on
> >> the main FSL FAQ
> >> (at [1]https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FSL%20FAQ ):
> >> • If using a double minus option that takes an argument, make sure you use
> >> an equals sign and no spaces (e.g. --start=2 ). This often causes the
> >> error Missing non-optional argument! when a space is used incorrectly.
> >> All the best,
> >> Mark
> >> On 9 Aug 2013, at 22:07, Yaroslav Halchenko <[2][log in to unmask]>
> >> wrote:
> >> I think the following cmdline is correctly composed but randomize
> >> complaints:
> >> *$> randomise -i all_FA_skeletonised -o tbss_FA -m mean_FA_skeleton_mask
> >> -d design.mat -t design.con -n 10000 --T2 -V --tfce_H 2 --tfce_E 0.5
> >> --tfce_C 6
> >> --tfce_H: Missing non-optional argument!
> >> try: randomise --help
> >> is that me or a bug?
> > --
> > Yaroslav O. Halchenko, Ph.D.
> > http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
> > Senior Research Associate, Psychological and Brain Sciences Dept.
> > Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> > Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
> > WWW: http://www.linkedin.com/in/yarik
--
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik
|