[Top][All Lists]

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

Re: RFE: allowing "" as a path specification for 'current dir' w/o prepe

From: L A Walsh
Subject: Re: RFE: allowing "" as a path specification for 'current dir' w/o prepending './' ?
Date: Mon, 27 Feb 2017 23:35:27 -0800
User-agent: Thunderbird

Bernhard Voelker wrote:
On 02/26/2017 08:44 AM, L.A. Walsh wrote:
Adding "./" when the user doesn't want it is unsafe because they
will remove it, creating another source of errors.
Thus said, treating the empty '' argument as "." for the traversal
but at the same time not doing so for the output somehow feels odd to me.
   What do 'ls' and 'du' do, since in the absence of a path
they start from the current directory but don't seem to
prepend './'.  However, I would not want to change how find
operates in the absence of a path -- compatibility problems.

   I'd only want to change what would otherwise be an
error into being something useful.

Like James suggested in the other email, please have a look at the code,
and try to come up with patches.
   I can do that, but it sounds like Jame would reject it out-of-hand.
Finally, when thinking about the use in shell scripts or on the
command line, I'm still convinced that
  $ var=
  $ find "$var"
should fail rather than processing with an assumed "." as starting
   Ok, then what about:
$ var=""
$ find $var
That won't fail w/error, yet its the same idea..., no?

reply via email to

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