diff --git a/pkg/packet/packet.go b/pkg/packet/packet.go index f409ec9d..553c5b2e 100644 --- a/pkg/packet/packet.go +++ b/pkg/packet/packet.go @@ -120,6 +120,10 @@ type ShellState struct { Error string `json:"error,omitempty"` } +func (state ShellState) IsEmpty() bool { + return state.Version == "" && state.Cwd == "" && len(state.ShellVars) == 0 && state.Aliases == "" && state.Funcs == "" && state.Error == "" +} + type CmdDataPacketType struct { Type string `json:"type"` RespId string `json:"respid"`