Sync from Windows

This commit is contained in:
js0ny 2024-11-20 14:27:00 +00:00
parent 8a7397c426
commit d5f8d807b9
80 changed files with 6079 additions and 5097 deletions

View file

@ -1,10 +1,10 @@
from IPython.core.magic import register_line_magic
@register_line_magic
def ps(cmd):
output = get_ipython().getoutput(f"powershell -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)
from IPython.core.magic import register_line_magic
@register_line_magic
def ps(cmd):
output = get_ipython().getoutput(f"powershell -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)