MCPcopy
hub / github.com/direnv/direnv / Shell

Interface Shell

internal/cmd/shell.go:8–18  ·  view source on GitHub ↗

Shell is the interface that represents the interaction with the host shell.

Source from the content-addressed store, hash-verified

6
7// Shell is the interface that represents the interaction with the host shell.
8type Shell interface {
9 // Hook is the string that gets evaluated into the host shell config and
10 // setups direnv as a prompt hook.
11 Hook() (string, error)
12
13 // Export outputs the ShellExport as an evaluatable string on the host shell
14 Export(e ShellExport) (string, error)
15
16 // Dump outputs and evaluatable string that sets the env in the host shell
17 Dump(env Env) (string, error)
18}
19
20// ShellExport represents environment variables to add and remove on the host
21// shell.

Callers 7

cmdHookActionFunction · 0.65
ToShellMethod · 0.65
watchDirCommandFunction · 0.65
ToShellMethod · 0.65
watchListCommandFunction · 0.65
cmdWatchActionFunction · 0.65
cmdDumpActionFunction · 0.65

Implementers 11

systemdShellinternal/cmd/shell_systemd.go
bashinternal/cmd/shell_bash.go
murexinternal/cmd/shell_murex.go
viminternal/cmd/shell_vim.go
fishinternal/cmd/shell_fish.go
pwshinternal/cmd/shell_pwsh.go
jsonShellinternal/cmd/shell_json.go
elvishinternal/cmd/shell_elvish.go
ghainternal/cmd/shell_gha.go
tcshinternal/cmd/shell_tcsh.go
zshinternal/cmd/shell_zsh.go

Calls

no outgoing calls

Tested by

no test coverage detected