MCPcopy Index your code
hub / github.com/jetify-com/devbox / refreshAliasForShell

Method refreshAliasForShell

internal/devbox/refresh.go:78–93  ·  view source on GitHub ↗
(format string)

Source from the content-addressed store, hash-verified

76}
77
78func (d *Devbox) refreshAliasForShell(format string) string {
79 // For nushell format, provide instructions as a comment since aliases with pipes are complex
80 if format == "nushell" {
81 devboxCmd := "global shellenv --preserve-path-stack -r --format nushell"
82 if !d.isGlobal() {
83 devboxCmd = fmt.Sprintf("shellenv --preserve-path-stack -c %q --format nushell", d.projectDir)
84 }
85 return fmt.Sprintf(
86 `# To refresh your devbox environment in nushell, run:
87# devbox %s | save -f ~/.cache/devbox-env.nu; source ~/.cache/devbox-env.nu`,
88 devboxCmd,
89 )
90 }
91 // Otherwise use the original refreshAlias function
92 return d.refreshAlias()
93}

Callers 1

EnvExportsMethod · 0.95

Calls 2

isGlobalMethod · 0.95
refreshAliasMethod · 0.95

Tested by

no test coverage detected