nushell/crates/nu-command/src/system
Darren Schroeder 42d2adc3e0
allow ps1 files to be executed without pwsh/powershell -c file.ps1 (#14379)
# Description

This PR allows nushell to run powershell scripts easier. You can already
do `powershell -c script.ps1` but this PR takes it a step further by
doing the `powershell -c` part for you. So, if you have script.ps1 you
can execute it by running it in the command position of the repl.

![image](https://github.com/user-attachments/assets/0661a746-27d9-4d21-b576-c244ff7fab2b)

or once it's in json, just consume it with nushell.

![image](https://github.com/user-attachments/assets/38f5c5d8-3659-41f0-872b-91a14909760b)

# User-Facing Changes
Easier to run powershell scripts. It should work on Windows with
powershell.exe.

# Tests + Formatting
Added 1 test

# After Submitting


---------

Co-authored-by: Wind <WindSoilder@outlook.com>
2024-11-20 21:55:26 +08:00
..
sys Add mac and IP address entries to sys net (#14389) 2024-11-19 16:20:52 -06:00
complete.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
exec.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
mod.rs Rewrite run_external.rs (#12921) 2024-05-23 02:05:27 +00:00
nu_check.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
ps.rs add start_time to ps -l on macos (#14127) 2024-10-21 11:55:30 -05:00
registry_query.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
run_external.rs allow ps1 files to be executed without pwsh/powershell -c file.ps1 (#14379) 2024-11-20 21:55:26 +08:00
uname.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
which_.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00