(c *Command)
| 28 | var preExecHookFn = preExecHook |
| 29 | |
| 30 | func preExecHook(c *Command) { |
| 31 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { |
| 32 | c.Print(MousetrapHelpText) |
| 33 | if MousetrapDisplayDuration > 0 { |
| 34 | time.Sleep(MousetrapDisplayDuration) |
| 35 | } else { |
| 36 | c.Println("Press return to continue...") |
| 37 | fmt.Scanln() |
| 38 | } |
| 39 | os.Exit(1) |
| 40 | } |
| 41 | } |