coreutils
[Top][All Lists]
Advanced

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

Re: Request for enhancement: links to 'true' and 'false'


From: Eric Blake
Subject: Re: Request for enhancement: links to 'true' and 'false'
Date: Sat, 20 Apr 2013 10:45:47 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 04/20/2013 09:31 AM, Jeffrey Streifling wrote:
> I'd like to request a small feature addition to the  'true' and 'false'
> utilities:  a modification to the install script so that /bin/1 is a
> hardlink to /bin/true and /bin/0 is a hardlink to /bin/false.

Nothing is preventing you from adding these additional names on your
system, but we probably won't standardize them in coreutils.

> In my view this would be a clearer idiom than what can be achieved without
> these links, due to the order that parameter expansion, aliasing, etc, are
> implemented in the shell.

Personally, I would be confused by an app name '1' that gives status 0,
and an app named '0' that gives status 1, so I wouldn't ever use such
aliases.  But again, you are free to add them to your system.

> Since, at present, 0 and 1 are not names of utilities or internal commands,
> you get an error if you try to execute 0 or 1.  Consequently, I anticipate
> that the addition would be backward compatible.

Yes, it would be backward compatible, but it is not standardized, so no
one would use them, so it's not worth making coreutils install such file
names by default.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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