URL: <https://savannah.gnu.org/bugs/?68131>
Summary: Shell script misbehaves when edited
Group: The GNU Bourne-Again SHell
Submitter: mattsh
Submitted: Sun 08 Mar 2026 09:42:09 AM PDT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 08 Mar 2026 09:42:09 AM PDT By: Matt <mattsh>
When a shell script is edited while running, it appears the current invocation
takes the update right away. However, it seems to keep track of its position
naively rather than based on any parsing of the script itself. Thus, if the
modification changes the position of text across lines, this results in
unexpected and potentially dangerous behavior.
If this is desired behavior (to allow editing in-flight scripts), please feel
free to close. However, it seems to me it would be safer to copy the full
shell script to a memory buffer when run, such that subsequent edits don't
affect already-running invocations.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68131>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
