Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
plugin.BasePlugin
}
Plugin persists shell history across container recreations by bind-mounting the history directory from the workspace state directory and setting HISTFILE. We mount the directory (not the file) so that shells like zsh can do atomic renames when saving history (e.g. writing .shell_history.new then renaming).
func (*Plugin) PreContainerRun ¶
func (p *Plugin) PreContainerRun(_ context.Context, req *plugin.PreContainerRunRequest) (*plugin.PreContainerRunResponse, error)
PreContainerRun creates a history file in the workspace state dir (if it doesn't already exist) and returns a bind mount plus HISTFILE env var so both bash and zsh write to the persistent location.
Click to show internal directories.
Click to hide internal directories.