in a 'g//' search, ed does not execute chained commands after 'a', 'i', 'c'

Bug #599652 reported by emghazal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ed (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ed

When chaining multiple commands with a g// search, ed in Ubuntu stops at the first 'a', 'i', or 'c' and does not execute any commands after it. It does not even examine them for syntax errors. ed in Mac OS X Leopard executes as expected, see the example below.

Note that in the second command, ed in OS X performs the command on one matched line before stopping due to the syntax error. This is probably not expected either, ed should not do anything if there is a syntax error. But this behaviour is better than not reporting the error at all and silently succeeding.

In Ubuntu:
$ ed
H
P
*a
foobar
foobaz
.
*g/foo/a\
spam\
.\
p
*# nothing printed here, contrast with OS X
*g/foo/a\
eggs\
.\
nonexistentcommand
*# no error printed here
*1,$p
foobar
eggs
spam
foobaz
eggs
spam
*# command done instead of stopping due to syntax error

In Mac OS X Leopard:
$ ed
H
P
*a
foobar
foobaz
.
*g/foo/a\
spam\
.\
p
spam
spam
*g/foo/a\
eggs\
.\
nonexistentcommand
?
invalid command suffix
*1,$p
foobar
eggs
spam
foobaz
spam
*

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ed 1.4-1build1
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Tue Jun 29 09:19:34 2010
ExecutablePath: /bin/ed
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SourcePackage: ed

Revision history for this message
emghazal (emghazal) wrote :
Revision history for this message
Martin Zobel-Helas (zobel) wrote :

fixed in 1.5-1 in debian/experimental

Changed in ed (Ubuntu):
status: New → In Progress
Revision history for this message
Alexander Jones (happy5214) wrote :

Version 1.5-1 has been released with Natty, so I'm closing this bug.

Changed in ed (Ubuntu):
status: In Progress → Fix Released
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.