Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#shell syntax support #3827

Open
snikeguo opened this issue Jan 30, 2025 · 1 comment
Open

#shell syntax support #3827

snikeguo opened this issue Jan 30, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@snikeguo
Copy link

snikeguo commented Jan 30, 2025

Is your feature request related to a problem? Please describe.
When I call shell commands, I have to use the Process class, which is troublesome.

Process process = new Process();

process.StartInfo.FileName = ...
 process.StartInfo.Arguments = ...
process.OutputDataReceived+=...
process.Start();


Describe the solution you'd like

void Main()
{
   var o="app";

   //shell line:
   var return_code= #shell gcc -o main.c $"{o}.elf";
  if(return_code==0)
 {
    #shell   echo "build ok" //echo.exe output string
    Console.WriteLine("build ok");   //C# output string
 }
   
  var dir=Console.ReadLine();

   //shell block:
  #shell 
  {
       mkdir  $"{dir}"
       cd $"{dir}"
       mkdir video //create a sub dir
  }
}

Describe alternatives you've considered
currently, there is no other available solution

@snikeguo snikeguo added the enhancement New feature or request label Jan 30, 2025
@snikeguo
Copy link
Author

snikeguo commented Feb 3, 2025

up up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant