coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: relpath


From: Pádraig Brady
Subject: Re: PATCH: relpath
Date: Thu, 01 Dec 2011 15:49:16 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 12/01/2011 03:26 PM, Peng Yu wrote:
>> realpath [-s|--strip] [-z|--zero]  filename  ...
> 
> I'm not sure why you and Jim want to merge a different function under
> the name realpath. To me, I think this less intuitive. The English
> word 'real path' is different from the word 'relative path'. If
> 'relpath' is used, probably don't need to read the man page to figure
> out how to use it. With your proposal, the user will for sure need to
> read the manual to figure out how to get relative path. So why merge
> them?

> The corresponding functions from the following languages are
> 
> perl: abs2rel
> python: os.path.relpath
> ruby: relative_path_from
> 
> None of them use the work 'real'? Therefore, I'm not sure it is a good
> idea to use 'real' instead of 'rel'.

Well the relpath and realpath functionalities are quite cohesive.
It's always a tradeoff for how much you break functionality
down into separate units, and at the command level that's
a bit higher than just a "relpath" function I think.

Given there are existing realpath utils in both BSD and Debian,
which could be easily augmented to add a --relative option,
from experience I'm leaning towards that option.
We can ensure that `apropos relative` will display realpath(1).

cheers,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]