bugfindutils - Bugs: bug #15195, misleading error message

 
 

bug #15195: misleading error message

Submitted by:  Eric Blake <ericb>
Submitted on:  Mon 12 Dec 2005 02:01:22 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Eric BlakeOpen/Closed: Closed
Release: 4.2.27Fixed Release: 4.3.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 07 Aug 2006 09:42:01 AM UTC, comment #7:

Fixed in 4.3.1, which has now been released

James Youngman <jay>
Project AdministratorIn charge of this item.
Thu 22 Dec 2005 05:12:58 AM UTC, comment #6:

A couple more misleading messages, even with your latest patches:

currently:
$ find \( -true -a ! \)
find: invalid expression; you have too many ')'

nicer:
$ find \( -true -a ! \)
find: expected an expression after '!'

currently:
$ find \(
find: invalid expression; empty parentheses are not allowed.

nicer:
$ find \(
find: invalid expression; I was expecting to find a ')' somewhere but did not see one.

Eric Blake <ericb>
Project Administrator
Wed 21 Dec 2005 01:09:59 PM UTC, comment #5:

Minor nit: NEWS now states that you get a more helpful error message from 'find . ( )', but most shells parse that wrong without quoting. Maybe it is worth rewriting the NEWS entry as 'find . \( \)'.

Thanks for putting up with my nits, by the way!

Eric Blake <ericb>
Project Administrator
Tue 20 Dec 2005 07:23:00 PM UTC, comment #4:

I've now fixed these too, I think.

James Youngman <jay>
Project AdministratorIn charge of this item.
Tue 20 Dec 2005 01:40:38 PM UTC, comment #3:

I agree you have fixed the empty parenthesis. But 4.3.1-CVS still has a buggy error message when ! is not followed by an expression:

$ find !
find: invalid expression; you have too many ')'

Eric Blake <ericb>
Project Administrator
Tue 20 Dec 2005 07:29:49 AM UTC, comment #2:

This is now fixed in the development code (4.3.1+, not 4.2.x). You now get:-

$ ./find -maxdepth 0 '(' -depth ')'
./find: warning: you have specified the -depth option after a non-option argument (, but options are not positional (-depth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

.
$ ./find '(' ')'
./find: invalid expression; empty parentheses are not allowed.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 18 Dec 2005 05:10:47 PM UTC, comment #1:

Also, consider this:

Buggy:
$ find !
find: invalid expression; you have too many ')'

Expected:
$ find !
find: invalid expression; missing argument to '!'

Eric Blake <ericb>
Project Administrator
Mon 12 Dec 2005 02:01:22 PM UTC, original submission:

Quality of implementation bug:

$ find \( \)
find: invalid expression; you have too many ')'

Actually, I have a balanced set of \( \), the error message in this case would better be worded as something like:

find: invalid expression; expecting an expression between '(' and ')'

Or you could change the behavior as an extension to POSIX, and treat \( \) the same as \( -true \), although I wouldn't recommend that.

Eric Blake <ericb>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 07 Aug 2006 09:42:01 AM UTCjayOpen/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.3.1
Tue 20 Dec 2005 07:29:49 AM UTCjayStatusNone=>Fixed
  Assigned toNone=>jay

Back to the top


Powered by Savane 3.1-cleanup1