Modified sage-edit:exec-cmd-internal.