Documentation
¶
Index ¶
- func AnalyticsFile() string
- func CleanLogFiles() error
- func DataDir() string
- func HistoryFile() string
- func HomeDir() string
- func LatestVersionFile() string
- func LogDir() string
- func LogFile() string
- func NewAutocdExecHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
- func RotateLogFiles() error
- func RunInteractiveShell(ctx context.Context, runner *interp.Runner, ...) error
- func SetAutocdRunner(runner *interp.Runner)
- func TryAutocd(input string, runner *interp.Runner) (string, bool)
- type DefaultUserPrompter
- type Paths
- type ShellState
- type StderrCapturer
- type UserPrompter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyticsFile ¶
func AnalyticsFile() string
func CleanLogFiles ¶ added in v0.35.0
func CleanLogFiles() error
func HistoryFile ¶
func HistoryFile() string
func LatestVersionFile ¶
func LatestVersionFile() string
func NewAutocdExecHandler ¶ added in v0.30.0
func NewAutocdExecHandler() func(next interp.ExecHandlerFunc) interp.ExecHandlerFunc
NewAutocdExecHandler creates an ExecHandler that implements autocd. It checks if non-command inputs are directories and executes cd instead. This allows builtins and commands to take precedence naturally without needing to maintain a hardcoded list of builtin names.
func RotateLogFiles ¶ added in v0.35.0
func RotateLogFiles() error
RotateLogFiles automatically removes old log files to prevent unbounded growth. Keeps the most recent 10 log files (based on modification time). This is called automatically when creating a new log sink.
func RunInteractiveShell ¶
func RunInteractiveShell( ctx context.Context, runner *interp.Runner, historyManager *history.HistoryManager, analyticsManager *analytics.AnalyticsManager, completionManager *completion.CompletionManager, coachManager *coach.CoachManager, logger *zap.Logger, stderrCapturer *StderrCapturer, ) error
func SetAutocdRunner ¶ added in v0.30.0
SetAutocdRunner sets the runner for the autocd handler
Types ¶
type DefaultUserPrompter ¶
type DefaultUserPrompter struct{}
type ShellState ¶
type ShellState struct {
LastCommand string
LastExitCode int
LastStderr string
FixHintShown bool // Track if the #? fix hint has been shown this session
}
ShellState holds the state of the shell execution
type StderrCapturer ¶
type StderrCapturer struct {
// contains filtered or unexported fields
}
StderrCapturer wraps an io.Writer and captures the output into a buffer
func NewStderrCapturer ¶
func NewStderrCapturer(original io.Writer) *StderrCapturer
func (*StderrCapturer) StartCapture ¶
func (c *StderrCapturer) StartCapture()
func (*StderrCapturer) StopCapture ¶
func (c *StderrCapturer) StopCapture() string
Click to show internal directories.
Click to hide internal directories.