| Ticket UUID: | 1040372 | |||
| Title: | generalise ::fileutil::stripPwd to any prefix | |||
| Type: | RFE | Version: | None | |
| Submitter: | coldstore | Created on: | 2004-10-05 03:05:53 | |
| Subsystem: | fileutil | Assigned To: | andreas_kupries | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2005-02-09 12:53:59 | |
| Resolution: | Closed By: | andreas_kupries | ||
| Closed on: | 2005-02-09 05:53:59 | |||
| Description: |
It would be useful if stripPwd was [stripPrefix $somepath $someprefix] which returned a path relative to $someprefix, instead of only [pwd]. | |||
| User Comments: |
andreas_kupries added on 2005-02-09 12:53:59:
Logged In: YES user_id=75003 Committed implementation of, documentation and testsuite for 'stripPath' to head. andreas_kupries added on 2005-01-20 07:33:38: Logged In: YES user_id=75003 Discussion on the chat. [16:27]akucolin - Question regarding 1040372 (Tcllib RFE) - Have you looked at stripN, if that is enough for you ? [16:29]Colinaku, looking now. The idea is that [stripN $path [llength [file split $prefix]]] is equivalent to [::fileutil::strip $path $prefix]. [16:30]ColinIsn't [::fileutil::stripN $path [llength [file split [pwd]]] equivalent to [::fileutil::stripPwd $path] too? [16:29]Out of a cloud of smoke, patthoyts appears! [16:31]akuActually no. [16:31]ColinAh. [16:32]akustripPwd does not touch the input if pwd is not prefix [16:32]akustripN always strips N elements [16:32]akuSo your generalized stripPath would make senbse, if it also does not touch input if prefix is not present [16:32]ColinThat would be useful. [16:32]akuOk. [16:33]akuI will add this as comment to the entry, so that I don't forget [16:33]ColinOk. andreas_kupries added on 2005-01-07 07:14:54: Logged In: YES user_id=75003 Ping. I am not seeing any response to my question from the last comment. andreas_kupries added on 2004-10-06 01:40:08: Logged In: YES user_id=75003 I was wondering where this came from, but then I saw the tkchat history. This can be used to feed a CVS server a fake PWD, and then strip it of locally, right ? Notice the "stripN" command. This allows you to strip N path elements from the beginning. This can be used for the same purpose, because you know how much segments your fake PWD had, no ? | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki