Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shell ¶
type Shell interface { // Command constructs the command to invoke the shell. Subcommands should be made available in the // shell environment as `env WASH_EMBEDDED=1 wash <subcommand>`. Rundir is a temporary directory // that will be added to `PATH` when the command is invoked; you can use it to add new executables // or store other temporary files. A `W` environment will also be set to the path where the shell // starts. // // Implementations should support their native interactive and non-interactive config, as well as // Wash's (.washrc and .washenv, respectively). They should: // 1. if ~/.washenv does not exist, load the shell's default non-interactive config // 1. configure subcommand aliases // 1. if ~/.washenv exists, load it // Additionally for interactive invocations they should: // 1. if ~/.washrc does not exist, load the shell's default interactive config // 1. reconfigure subcommand aliases (in case they were overridden) // 1. configure the prompt to show your location within the Wash hierarchy (use preparePrompt) // 1. override cd so `cd` without arguments changes directory to $W (use overrideCd) // 1. if ~/.washrc exists, load it Command(subcommands []string, rundir string) (*exec.Cmd, error) }
Shell provides setup for a specific shell, such as bash or zsh.
Click to show internal directories.
Click to hide internal directories.