Skip to content

Commit 4c06a8a

Browse files
authored
Merge pull request #2990 from carapace-sh/nu-filter-deprecated
nushell: replace deprecated `filter` with `where`
2 parents 4a0cd02 + b2cdbf9 commit 4c06a8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/carapace/cmd/lazyinit/lazyInit.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func pathSnippet(shell string) (snippet string) {
3131
case "nushell":
3232
fixedBinDir := strings.ReplaceAll(binDir, `\`, `\\`)
3333
if runtime.GOOS == "windows" {
34-
snippet = fmt.Sprintf(`$env.Path = ($env.Path | split row (char esep) | filter { $in != "%v" } | prepend "%v")`, fixedBinDir, fixedBinDir)
34+
snippet = fmt.Sprintf(`$env.Path = ($env.Path | split row (char esep) | where { $in != "%v" } | prepend "%v")`, fixedBinDir, fixedBinDir)
3535
} else {
36-
snippet = fmt.Sprintf(`$env.PATH = ($env.PATH | split row (char esep) | filter { $in != "%v" } | prepend "%v")`, fixedBinDir, fixedBinDir)
36+
snippet = fmt.Sprintf(`$env.PATH = ($env.PATH | split row (char esep) | where { $in != "%v" } | prepend "%v")`, fixedBinDir, fixedBinDir)
3737
}
3838

3939
case "powershell":

0 commit comments

Comments
 (0)