Skip to content

Commit

Permalink
Merge pull request #1236 from LoicGrobol/patch-2
Browse files Browse the repository at this point in the history
Replace deprecated `builtins.__xonsh__` by `xonsh.built_ins.XSH`
  • Loading branch information
rsteube authored Jul 24, 2022
2 parents c7f8ba2 + 0da3269 commit b7ac9a4
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 b7ac9a4

Please sign in to comment.