case patterns that begin with some keywords aren't matched correctly

Bug #610945 reported by Philip Winter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
csh (Debian)
New
Unknown
csh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: csh

I encountered this bug when running Ubuntu 10.04 and csh version 20070713-2ubuntu1.

Look at the following code snippet:

  switch ($ARG)
    case ifort:
      echo "Your arg was ifort"
      breaksw
    default:
      echo "Your arg was not ifort"
      breaksw
  endsw

I expected the first case pattern to be matched when ARG=ifort, but it was not. The first case pattern is matched when ARG=if.

Similar behavior was observed when the case pattern began with switch. All patterns behaved as expected when encased in quotes.

Changed in csh (Ubuntu):
status: New → Confirmed
Changed in csh (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.