On Aug 22, 2009, at 8:46 AM, Russel Winder wrote:
On Fri, 2009-08-21 at 08:59 +1000, Adam Murdoch wrote:
[ . . . ]
I'm going to switch to a trailing - character for now, to get the
broken
windows build to pass.
I am not sure that will work as well as you hope. Commands are read
left-to-right and people generally stop reading the word when they
have
recognized it and they move on to the next word. This means ends of
words are often not read in the same detail as the beginning of a
word.
Trailing - could get lost.
Maybe. People write the command-lines much, much more often than they
read them, so I'm not sure it's much of a problem.
Yes and no. I agree writing a command line is more common, but you
still have to read the line and trailing - is such a small character
in
most fonts, it can be mistaken for a mark on the screen. Having said
that, my main worry is Bash scripts where the command is read more
than
written and is being edited using the editor font not the terminal
font.
I was going to suggest a character such as @
or # -- something big, preferably used at the start as you were
trying
with ! and ^.
The problem with # is that it is used as the comment character in
scripts so might present a problem. I haven't experimented.
It seems to me that any useful punctuation character, other than '-',
is pretty much taken already.
There is always * I don't thing any command line interpreter uses
that.
An alternative might be to use a command-line option for excluding
tasks:
gradle developerBuild -x test -x check
gradle developerBuild -x test,check
I think this might be preferable since the whole point is to change
the
behaviour of the developerBuild task, not to have test and check as
tasks. The question arises whether the following should be allowed as
well/instead of:
gradle -x test -x check developerBuild
gradle -x test,check developerBuild
Thinking again about it, I also come to the conclusion that might make
sense to go for a normal command line option.
Advantages:
- Principle of least surprise. New users want to exclude a task and
will type gradle -h to look for an option.
- Easiest implementation.
- The order of declaration: exclude task vs. task exclude (at least
this is the case for the current way we implement things)
Disadvantages:
- More to type
If we allow patterns in the future for excluding task, a trailing '-'
will be even harder to decipher.
Although it still feels sexy to have a special syntax for excluding
tasks I think now going for a normal options is the best approach.
- Hans
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email