never log ephemeral commands to history (#676)

This commit is contained in:
Mike Sawka 2024-06-07 17:58:21 -07:00 committed by GitHub
parent 7888a61766
commit 2361154551
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -769,7 +769,7 @@ func EvalCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (scbus.U
} else { } else {
return nil, fmt.Errorf("error in Eval Meta Command: %w", rtnErr) return nil, fmt.Errorf("error in Eval Meta Command: %w", rtnErr)
} }
if !resolveBool(pk.Kwargs[KwArgNoHist], false) { if !resolveBool(pk.Kwargs[KwArgNoHist], false) && pk.EphemeralOpts == nil {
// TODO should this be "pk" or "newPk" (2nd arg) // TODO should this be "pk" or "newPk" (2nd arg)
err := addToHistory(ctx, pk, historyContext, (newPk.MetaCmd != "run"), (rtnErr != nil)) err := addToHistory(ctx, pk, historyContext, (newPk.MetaCmd != "run"), (rtnErr != nil))
if err != nil { if err != nil {