Skip to content

Commit

Permalink
replace let-env with $env.<environment-variable>
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett authored and rsteube committed Jul 26, 2023
1 parent 60f4a6d commit 821c20a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/carapace/cmd/lazyInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func pathSnippet(shell string) (snippet string) {
case "nushell":
fixedBinDir := strings.ReplaceAll(binDir, `\`, `\\`)
if runtime.GOOS == "windows" {
snippet = fmt.Sprintf(`let-env Path = ($env.Path | prepend "%v")`, fixedBinDir)
snippet = fmt.Sprintf(`$env.Path = ($env.Path | prepend "%v")`, fixedBinDir)
} else {
snippet = fmt.Sprintf(`let-env PATH = ($env.PATH | prepend "%v")`, fixedBinDir)
snippet = fmt.Sprintf(`$env.PATH = ($env.PATH | prepend "%v")`, fixedBinDir)
}

case "powershell":
Expand Down Expand Up @@ -127,7 +127,7 @@ $current.completions.external = ($current.completions.external
| default true enable
| default $carapace_completer completer)
let-env config = $current
$env.config = $current
`

return fmt.Sprintf(snippet, pathSnippet("nushell"))
Expand Down

0 comments on commit 821c20a

Please sign in to comment.