MCPcopy Index your code
hub / github.com/abiosoft/ishell / newContext

Function newContext

ishell.go:662–680  ·  view source on GitHub ↗
(s *Shell, cmd *Cmd, args []string)

Source from the content-addressed store, hash-verified

660}
661
662func newContext(s *Shell, cmd *Cmd, args []string) *Context {
663 if cmd == nil {
664 cmd = &Cmd{}
665 }
666 return &Context{
667 Actions: s.Actions,
668 progressBar: copyShellProgressBar(s),
669 Args: args,
670 RawArgs: s.rawArgs,
671 Cmd: *cmd,
672 contextValues: func() contextValues {
673 values := contextValues{}
674 for k := range s.contextValues {
675 values[k] = s.contextValues[k]
676 }
677 return values
678 }(),
679 }
680}
681
682func copyShellProgressBar(s *Shell) ProgressBar {
683 sp := s.progressBar.(*progressBarImpl)

Callers 4

handleInputFunction · 0.85
handleInterruptFunction · 0.85
handleEOFFunction · 0.85
handleCommandMethod · 0.85

Calls 1

copyShellProgressBarFunction · 0.85

Tested by

no test coverage detected