Skip to content

Commit

Permalink
replace deprecated builtins.__xonsh__ by xonsh.built_ins.XSH
Browse files Browse the repository at this point in the history
  • Loading branch information
LoicGrobol authored Jul 24, 2022
1 parent c7f8ba2 commit 0da3269
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/carapace/cmd/lazyInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ def _carapace_lazy(context):
if (context.command and
context.command.arg_index > 0 and
context.command.args[0].value in [%v]):
builtins.__xonsh__.completers = builtins.__xonsh__.completers.copy()
XSH.completers = XSH.completers.copy()
exec(compile(subprocess.run(['carapace', context.command.args[0].value, 'xonsh'], stdout=subprocess.PIPE).stdout.decode('utf-8'), "", "exec"))
return builtins.__xonsh__.completers[context.command.args[0].value](context)
return XSH.completers[context.command.args[0].value](context)
`
complete := make([]string, len(completers))
for index, completer := range completers {
Expand All @@ -291,9 +291,9 @@ def _carapace_lazy(context):
if (context.command and
context.command.arg_index > 0 and
context.command.args[0].value in [%v]):
builtins.__xonsh__.completers = builtins.__xonsh__.completers.copy()
XSH.completers = XSH.completers.copy()
exec(compile(subprocess.run(['carapace', '--spec', '%v/'+context.command.args[0].value+'.yaml', 'xonsh'], stdout=subprocess.PIPE).stdout.decode('utf-8'), "", "exec"))
return builtins.__xonsh__.completers[context.command.args[0].value](context)
return XSH.completers[context.command.args[0].value](context)
`, strings.Join(quotedSpecs, ", "), dir)

}
Expand Down

0 comments on commit 0da3269

Please sign in to comment.