ed

[hare] The standard editor
Log | Files | Refs | README | LICENSE

commit 580ce39ee60bd6ff30ab7c1db2c4a2608e70944f
parent 8c30c8b01d98d352e289c0167f6a5089427076e3
Author: Byron Torres <b@torresjrjr.com>
Date:   Wed, 10 Jan 2024 19:18:34 +0000

rename prev_shcmd -> lastshcmd

Diffstat:
Mcommand.ha | 4++--
Mmain.ha | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/command.ha b/command.ha @@ -612,7 +612,7 @@ fn cmd_shellescape(s: *Session, cmd: *Command) (void | Error) = { // handling '!!' if (strings::next(&iter) == '!') { - match (s.prev_shcmd) { + match (s.lastshcmd) { case void => return NoPrevShCmd; case let s: str => @@ -670,7 +670,7 @@ fn cmd_shellescape(s: *Session, cmd: *Command) (void | Error) = { if (!s.suppressmode) fmt::println("!")!; - s.prev_shcmd = strings::dup(shcmdline); + s.lastshcmd = strings::dup(shcmdline); }; fn cmd_null(s: *Session, cmd: *Command) (void | Error) = { diff --git a/main.ha b/main.ha @@ -16,7 +16,7 @@ type Session = struct{ promptmode: bool, prompt: str, warned: bool, - prev_shcmd: (str | void), + lastshcmd: (void | str), lastregex: (void | str), }; @@ -45,7 +45,7 @@ export fn main() void = { input = &input, buf = &buffer, prompt = "*", - prev_shcmd = void, + lastshcmd = void, lasterror = void, lastregex = void, ...