[MacPorts] #23628: fs-traverse doesn't work on paths that contain a space

MacPorts noreply at macports.org
Sat Feb 13 06:54:57 PST 2010


#23628: fs-traverse doesn't work on paths that contain a space
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
     Type:  defect                   |      Status:  new                                  
 Priority:  Normal                   |   Milestone:  MacPorts Future                      
Component:  base                     |     Version:  1.8.2                                
 Keywords:                           |        Port:                                       
-------------------------------------+--------------------------------------

Comment(by raimue@…):

 I guess your problem is only the Tcl syntax for lists.

 This is a working example of using a path with spaces with fs-traverse:
 {{{
 fs-traverse -- foo {{/Library/Application Support}} {
     ui_msg $foo
 }
 }}}

 You can pass multiple paths to fs-traverse, which means it expects a Tcl
 list. Such lists are separated by whitespace:
 {{{
 {foo baz}
 }}}
 When you want to pass a path with spaces, it has to be quoted once more.
 When you want to use variables inside the path names, you will have to use
 double quotes instead of braces. Note that nested double quotes need
 backslashes as escape character.
 {{{
 {{foo bar} baz}
 "\"${prefix}/foo bar\" baz"
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/23628#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list