#19 Inifinte loop with "fc" pattern replace

open-accepted
8
2001-08-19
2001-07-08
No

The "fc" (and "r", "history", etc.) commands allow a
pattern and replacement to be specified, e.g. "r
OLD=NEW". However, if the OLD string is empty, zsh
goes into an infinite loop.

This happens in all versions of zsh ever released, as
far as I can tell. For some versions, "kill -9" is
necessary to get rid of the looping shell; others
respond to "kill -1" (HUP).

The attached patch may be applied to 4.0.x, 3.1.x,
3.0.8, 3.0.7, 3.0.6, and possibly even 3.0.5 (with
small amounts of fuzz on the 3.x.y versions). Earlier
than that I'm not sure, and earlier than 3.0.0 the file
names will be different.

Discussion

  • Bart Schaefer

    Bart Schaefer - 2001-07-08

    Fix for "r =" infinite loop

     
  • Bart Schaefer

    Bart Schaefer - 2001-08-19
    • summary: Inifinte loop with "fc" pattern replace --> Inifinte loop with "fc" pattern replace
    • status: open --> closed-accepted
     
  • Bart Schaefer

    Bart Schaefer - 2001-08-19

    Logged In: YES
    user_id=22647

    Fixed in 4.0.2 (patch applies to 4.0.1).

     
  • Bart Schaefer

    Bart Schaefer - 2001-08-19

    Logged In: YES
    user_id=22647

    Argh. Typos in previous comment; it should read:

    Fixed in 4.0.3 (patch applies to 4.0.2).

    Sorry.

     
  • Bart Schaefer

    Bart Schaefer - 2001-08-19
    • summary: Inifinte loop with "fc" pattern replace --> Inifinte loop with "fc" pattern replace
    • status: closed-accepted --> open-accepted