Comment 3 for bug 173211

Revision history for this message
C de-Avillez (hggdh2) wrote :

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?