Opened 15 years ago

Closed 15 years ago

#21873 closed enhancement (fixed)

fs-traverse: Add -tails option to remove path prefix

Reported by: raimue (Rainer Müller) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone: MacPorts 1.9.0
Component: base Version:
Keywords: Cc:
Port:

Description

fs-traverse currently returns the full path name combined from the path argument and the "local" file name. It would be helpful to have an option to get the "local" part only.

Example:

fs-traverse f /path/to/foo {
    puts $f
}

=>

/path/to/foo/file1
/path/to/foo/file2
...
fs-traverse -strip f /path/to/foo {
    puts $f
}

=>

file1
file2
...

Change History (4)

comment:1 Changed 15 years ago by blb@…

If we want to be consistent with Tcl, perhaps we should call it -tails like the option for glob?

comment:2 Changed 15 years ago by raimue (Rainer Müller)

Summary: fs-traverse: Add -strip option to remove path prefixfs-traverse: Add -tails option to remove path prefix

comment:3 Changed 15 years ago by raimue (Rainer Müller)

Owner: changed from macports-tickets@… to raimue@…
Status: newassigned

comment:4 Changed 15 years ago by raimue (Rainer Müller)

Milestone: MacPorts FutureMacPorts 1.9.0
Resolution: fixed
Status: assignedclosed

Added in r65785.

Note: See TracTickets for help on using tickets.