diff --git a/example/cmd/root_test.go b/example/cmd/root_test.go index 25d63e235..f79f25173 100644 --- a/example/cmd/root_test.go +++ b/example/cmd/root_test.go @@ -940,8 +940,11 @@ def _example_completer(prefix, line, begidx, endidx, ctx): stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() cb = cb.decode('utf-8') - nonlocal prefix, line, begidx, endidx, ctx - return eval(cb) + if cb == "": + return {} + else: + nonlocal prefix, line, begidx, endidx, ctx + return eval(cb) if False: pass diff --git a/xonsh/snippet.go b/xonsh/snippet.go index 1f106299e..681f75770 100644 --- a/xonsh/snippet.go +++ b/xonsh/snippet.go @@ -86,8 +86,11 @@ def _%v_completer(prefix, line, begidx, endidx, ctx): stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() cb = cb.decode('utf-8') - nonlocal prefix, line, begidx, endidx, ctx - return eval(cb) + if cb == "": + return {} + else: + nonlocal prefix, line, begidx, endidx, ctx + return eval(cb) if False: pass%s