diff --git a/client/cmd/saveHistoryEntry.go b/client/cmd/saveHistoryEntry.go index 167ad0f..e423d47 100644 --- a/client/cmd/saveHistoryEntry.go +++ b/client/cmd/saveHistoryEntry.go @@ -149,7 +149,7 @@ func presaveHistoryEntry(ctx context.Context) { cmd, err := extractCommandFromArg(ctx, shellName, os.Args[3] /* isPresave = */, true) lib.CheckFatalError(err) entry.Command = cmd - if strings.HasPrefix(" ", entry.Command) || strings.TrimSpace(entry.Command) == "" { + if strings.HasPrefix(entry.Command, " ") || strings.TrimSpace(entry.Command) == "" { // Don't save commands that start with a space return }