Minor fix

This commit is contained in:
js0ny 2025-01-27 15:24:03 +00:00
parent 3cbbb30845
commit d90256a16f
9 changed files with 134 additions and 123 deletions

View file

@ -1,10 +0,0 @@
from IPython.core.magic import register_line_magic
@register_line_magic
def ps(cmd):
output = get_ipython().getoutput(f"pwsh -NoProfile -Command {cmd}")
# If no variable is assigned to the output, print it
if get_ipython().last_execution_result is None:
print("\n".join(output))
else:
return "\n".join(output)