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

Method Interrupt

ishell.go:407–409  ·  view source on GitHub ↗

Interrupt adds a function to handle keyboard interrupt (Ctrl-c). count is the number of consecutive times that Ctrl-c has been pressed. i.e. any input apart from Ctrl-c resets count to 0.

(f func(c *Context, count int, input string))

Source from the content-addressed store, hash-verified

405// count is the number of consecutive times that Ctrl-c has been pressed.
406// i.e. any input apart from Ctrl-c resets count to 0.
407func (s *Shell) Interrupt(f func(c *Context, count int, input string)) {
408 s.interrupt = f
409}
410
411// EOF adds a function to handle End of File input (Ctrl-d).
412// This overrides the default behaviour which terminates the shell.

Callers 1

addDefaultFuncsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected