Documentation ¶
Index ¶
Constants ¶
View Source
const ( Bash = "bash" Zsh = "zsh" Fish = "fish" )
View Source
const ( ModePerm fs.FileMode = 0o644 VMDisableEnvName string = "VM_DISABLE" VMEnvFileName string = "vmr" )
Variables ¶
View Source
var ShellRegExp = regexp.MustCompile(`# cd hook start[\w\W]+# cd hook end`)
Update vmr.sh or vmr.fish
Functions ¶
func FormatPathString ¶
func UpdateVMRShellFile ¶ added in v0.6.3
func UpdateVMRShellFile(fPath, vmrPathEnv, newHookContent string)
Types ¶
type BashShell ¶
type BashShell struct{}
func NewBashShell ¶
func NewBashShell() *BashShell
func (*BashShell) VMEnvConfPath ¶
func (*BashShell) WriteVMEnvToShell ¶
func (b *BashShell) WriteVMEnvToShell()
type FishShell ¶
type FishShell struct{}
func NewFishShell ¶
func NewFishShell() *FishShell
func (*FishShell) VMEnvConfPath ¶
func (*FishShell) WriteVMEnvToShell ¶
func (f *FishShell) WriteVMEnvToShell()
type ZshShell ¶
type ZshShell struct{}
func NewZshShell ¶
func NewZshShell() *ZshShell
func (*ZshShell) VMEnvConfPath ¶
func (*ZshShell) WriteVMEnvToShell ¶
func (z *ZshShell) WriteVMEnvToShell()
Click to show internal directories.
Click to hide internal directories.