Documentation ¶
Index ¶
- Constants
- func AddTokenSwapEntry(entry *TokenSwapEntry) error
- func DefaultTermSize() waveobj.TermSize
- func DetectLocalShellPath() string
- func EncodeEnvVarsForShell(shellType string, env map[string]string) (string, error)
- func GetEnvStrKey(envStr string) string
- func GetLocalBashRcFileOverride() string
- func GetLocalWaveFishFilePath() string
- func GetLocalWavePowershellEnv() string
- func GetLocalWshBinaryPath(version string, goos string, goarch string) (string, error)
- func GetLocalZshZDotDir() string
- func GetMacUserShell() string
- func GetShellTypeFromShellPath(shellPath string) string
- func HardQuote(s string) string
- func HardQuoteFish(s string) string
- func HardQuotePowerShell(s string) string
- func InitCustomShellStartupFiles() error
- func InitRcFiles(waveHome string, absWshBinDir string) error
- func IsValidEnvVarName(name string) bool
- func SoftQuote(s string) string
- func UpdateCmdEnv(cmd *exec.Cmd, envVars map[string]string)
- func WaveshellLocalEnvVars(termType string) map[string]string
- type TokenSwapEntry
- type UnpackedTokenType
Constants ¶
View Source
const ( ShellType_bash = "bash" ShellType_zsh = "zsh" ShellType_fish = "fish" ShellType_pwsh = "pwsh" ShellType_unknown = "unknown" )
View Source
const ( // there must be no spaces in these integration dir paths ZshIntegrationDir = "shell/zsh" BashIntegrationDir = "shell/bash" PwshIntegrationDir = "shell/pwsh" FishIntegrationDir = "shell/fish" WaveHomeBinDir = "bin" ZshStartup_Zprofile = ` # Source the original zprofile [ -f ~/.zprofile ] && source ~/.zprofile ` ZshStartup_Zshrc = `` /* 556-byte string literal not displayed */ ZshStartup_Zlogin = `` /* 181-byte string literal not displayed */ ZshStartup_Zshenv = `` /* 372-byte string literal not displayed */ BashStartup_Bashrc = `` /* 792-byte string literal not displayed */ FishStartup_Wavefish = `` /* 344-byte string literal not displayed */ PwshStartup_wavepwsh = `` /* 523-byte string literal not displayed */ )
View Source
const DefaultShellPath = "/bin/bash"
View Source
const DefaultTermCols = 80
View Source
const DefaultTermRows = 24
View Source
const DefaultTermType = "xterm-256color"
View Source
const (
MaxQuoteSize = 10000000 // 10MB
)
Variables ¶
This section is empty.
Functions ¶
func AddTokenSwapEntry ¶ added in v0.11.0
func AddTokenSwapEntry(entry *TokenSwapEntry) error
func DefaultTermSize ¶
func DetectLocalShellPath ¶
func DetectLocalShellPath() string
func EncodeEnvVarsForShell ¶ added in v0.11.0
func GetEnvStrKey ¶
func GetLocalBashRcFileOverride ¶ added in v0.11.0
func GetLocalBashRcFileOverride() string
func GetLocalWaveFishFilePath ¶ added in v0.11.0
func GetLocalWaveFishFilePath() string
func GetLocalWavePowershellEnv ¶ added in v0.11.0
func GetLocalWavePowershellEnv() string
func GetLocalWshBinaryPath ¶ added in v0.11.0
func GetLocalZshZDotDir ¶ added in v0.11.0
func GetLocalZshZDotDir() string
func GetMacUserShell ¶
func GetMacUserShell() string
func GetShellTypeFromShellPath ¶ added in v0.11.0
func HardQuoteFish ¶ added in v0.11.0
does not encode newlines or backticks
func HardQuotePowerShell ¶ added in v0.11.0
func InitCustomShellStartupFiles ¶
func InitCustomShellStartupFiles() error
in a Once block so it can be called multiple times we run it at startup, but also before launching local shells so we know everything is initialized before starting the shell
func InitRcFiles ¶
absWshBinDir must be an absolute, expanded path (no ~ or $HOME, etc.) it will be hard-quoted appropriately for the shell
func IsValidEnvVarName ¶ added in v0.11.0
func WaveshellLocalEnvVars ¶
Types ¶
type TokenSwapEntry ¶ added in v0.11.0
type TokenSwapEntry struct { Token string `json:"token"` SockName string `json:"sockname,omitempty"` RpcContext *wshrpc.RpcContext `json:"rpccontext,omitempty"` Env map[string]string `json:"env,omitempty"` ScriptText string `json:"scripttext,omitempty"` Exp time.Time `json:"-"` }
func GetAndRemoveTokenSwapEntry ¶ added in v0.11.0
func GetAndRemoveTokenSwapEntry(token string) *TokenSwapEntry
func (*TokenSwapEntry) PackForClient ¶ added in v0.11.0
func (t *TokenSwapEntry) PackForClient() (string, error)
type UnpackedTokenType ¶ added in v0.11.0
type UnpackedTokenType struct { Token string `json:"token"` // uuid SockName string `json:"sockname,omitempty"` RpcContext *wshrpc.RpcContext `json:"rpccontext,omitempty"` }
func UnpackSwapToken ¶ added in v0.11.0
func UnpackSwapToken(token string) (*UnpackedTokenType, error)
func (*UnpackedTokenType) Pack ¶ added in v0.11.0
func (t *UnpackedTokenType) Pack() (string, error)
Click to show internal directories.
Click to hide internal directories.