Opened 9 years ago

Closed 7 years ago

#581 closed defect (fixed)

colornames that start with "pale" get confused with "palette"

Reported by: Elaine Meng Owned by: Greg Couch
Priority: minor Milestone: 0.7
Component: Command Line Version:
Keywords: Cc: Tom Goddard
Blocked By: 969 Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Colornames that start with "pale" get mixed up with the "palette" keyword of the "color" command. So although you can use other color names with spaces in them without quoting, you must either use quotes or smush the words in the colorname together. So, the first example here won't work because it tries to fetch a palette, but the others will:

color /b pale green
color /b "pale green"
color /b palegreen

I imagine it is low priority, just thought I should record this observation.

Change History (10)

in reply to:  1 ; comment:1 by goddard@…, 9 years ago

Any suggestion for fixing this?  I think the solution is to use palegreen.  Having spaces in arguments unfortunately leads to many problems as we have seen with atom specs.

comment:2 by Eric Pettersen, 9 years ago

Cc: Tom Goddard added; Greg Couch removed
Owner: changed from Tom Goddard to Greg Couch

According to usage, the 'palette' keyword would follow a color name. I thought color-name parsing was supposed to be "greedy", just like atom specs. If it were, it should find "pale green" as a color name before it begins to look for the "palette" keyword. Seems like a bug to me.

comment:3 by Greg Couch, 9 years ago

Unless the argument is a required positional argument, keywords are checked first. And optional positional arguments can be specified as a keyword argument. So the unambigious command is:

color /b color pale green

comment:4 by Conrad Huang, 9 years ago

Component: UnassignedCommand Line
Milestone: Beta Release

comment:5 by Conrad Huang, 8 years ago

Milestone: Beta ReleaseBeta 2

comment:6 by Eric Pettersen, 8 years ago

Milestone: Beta 20.6

Milestone renamed

comment:7 by Greg Couch, 8 years ago

Milestone: 0.60.7

comment:8 by Elaine Meng, 8 years ago

Implementing #969 (color subcommands) is expected to circumvent this problem.

comment:9 by Tom Ferrin, 8 years ago

Blocked By: 969

comment:10 by Greg Couch, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed by fixe to #969.

Note: See TracTickets for help on using tickets.