File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
cmd/carapace/cmd/lazyinit Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ func Nushell(completers []string) string {
1414
1515let carapace_completer = {|spans|
1616 # if the current command is an alias, get it's expansion
17- let expanded_alias = (scope aliases | where name == $spans.0 | get -o 0 .expansion)
17+ let expanded_alias = (scope aliases | where name == $spans.0 | $in.0? .expansion? )
1818
1919 # overwrite
2020 let spans = (if $expanded_alias != null {
@@ -32,7 +32,8 @@ mut current = (($env | default {} config).config | default {} completions)
3232$current.completions = ($current.completions | default {} external)
3333$current.completions.external = ($current.completions.external
3434| default true enable
35- | default { $carapace_completer } completer)
35+ # backwards compatible workaround for default, see nushell #15654
36+ | upsert completer { if $in == null { $carapace_completer } else { $in } })
3637
3738$env.config = $current
3839 `
You can’t perform that action at this time.
0 commit comments