Activity log for bug #173211

Date Who What changed Old value New value Message
2007-12-01 10:46:26 Pander bug added bug
2008-11-16 05:06:40 Daniel T Chen coreutils: importance Undecided Wishlist
2008-11-16 05:06:40 Daniel T Chen coreutils: statusexplanation
2008-11-17 03:25:01 C de-Avillez coreutils: status New Incomplete
2008-11-17 03:25:01 C de-Avillez coreutils: statusexplanation Thank you for opening this bug and helping making Ubuntu better. Before I propose this upstream, I would like to know more about what you would like to have -- is it just a fixed prefix (pretty much like the suffix currently supported)? For example (and supposing this new option is to be triggered by the '-p' or '--prefix' parameter): basename --prefix atest /this/is/a/sample/atest-data.filename would return '-data.filename', while basename --prefix atest /this/is/a/sample/atest-data.filename .filename would return '-data'. Is this a correct interpretation? Thanks.
2008-11-17 09:52:27 Pander coreutils: status Incomplete Confirmed
2008-11-17 09:52:27 Pander coreutils: statusexplanation Thank you for opening this bug and helping making Ubuntu better. Before I propose this upstream, I would like to know more about what you would like to have -- is it just a fixed prefix (pretty much like the suffix currently supported)? For example (and supposing this new option is to be triggered by the '-p' or '--prefix' parameter): basename --prefix atest /this/is/a/sample/atest-data.filename would return '-data.filename', while basename --prefix atest /this/is/a/sample/atest-data.filename .filename would return '-data'. Is this a correct interpretation? Thanks. current functionality of basename: basename atest /this/is/a/sample/atest-data.filename atest basename atest atest-data.filename atest basename atest-data atest-data.filename atest-data suggested new functionality as you propose indeed: basename --prefix /this/is/a/sample/atest /this/is/a/sample/atest-data.filename -data.filename basename --prefix atest /this/is/a/sample/atest-data.filename -data.filename basename --prefix atest /this/is/a/sample/atest-data.filename .filename -data
2008-11-17 11:15:03 C de-Avillez coreutils: status Confirmed Incomplete
2008-11-17 11:15:03 C de-Avillez coreutils: statusexplanation current functionality of basename: basename atest /this/is/a/sample/atest-data.filename atest basename atest atest-data.filename atest basename atest-data atest-data.filename atest-data suggested new functionality as you propose indeed: basename --prefix /this/is/a/sample/atest /this/is/a/sample/atest-data.filename -data.filename basename --prefix atest /this/is/a/sample/atest-data.filename -data.filename basename --prefix atest /this/is/a/sample/atest-data.filename .filename -data Hi Pander, Thank you for your response. But there are some of your examples that look like they are slightly misconstrued: the syntax for 'basename' is 'basename <file name> <suffix>'. So -- although syntactically correct -- your current functionality examples leave me wit a bit of a taste of a incorrect call. More importantly, the first example on the suggested functionality does not make much of a sense to me: basename --prefix /this/is/a/sample/atest /this/is/a/sample/atest-data.filename -data.filename Here's the reason: basename strips directories from a provided file name. As such, it does not (for me) make sense to have a prefix that includes directory parts (since there will be none in the returning string). The prefix *could* be given as shown, but it would never match (very much like giving an incorrect suffix). Can you please clarify what you would like by this first example?
2008-11-17 11:45:10 Pander coreutils: status Incomplete Confirmed
2008-11-17 11:45:10 Pander coreutils: statusexplanation Hi Pander, Thank you for your response. But there are some of your examples that look like they are slightly misconstrued: the syntax for 'basename' is 'basename <file name> <suffix>'. So -- although syntactically correct -- your current functionality examples leave me wit a bit of a taste of a incorrect call. More importantly, the first example on the suggested functionality does not make much of a sense to me: basename --prefix /this/is/a/sample/atest /this/is/a/sample/atest-data.filename -data.filename Here's the reason: basename strips directories from a provided file name. As such, it does not (for me) make sense to have a prefix that includes directory parts (since there will be none in the returning string). The prefix *could* be given as shown, but it would never match (very much like giving an incorrect suffix). Can you please clarify what you would like by this first example? I just did some tests with basename in order to be sure what it does when a complete path is supplied. This is not an extra requirement, just an extra check to cover those cases.
2008-11-17 12:23:30 C de-Avillez coreutils: status Confirmed Triaged
2008-11-17 12:23:30 C de-Avillez coreutils: statusexplanation I just did some tests with basename in order to be sure what it does when a complete path is supplied. This is not an extra requirement, just an extra check to cover those cases. Thanks. I will propose it upstream. Let's see how it is received.