DEV Community

Discussion on: Add a Bash-like autocomplete to your PowerShell

Collapse
 
pvcodes profile image
Pranjal Verma • Edited

Can Anyone Help me out !!!!!
*In PoweShell
I only want a snippet that do

  1. when i enter "run"
  2. and hit tab key,
  3. It simply autocomplete the expression to "g++ -g **.cpp -o main.exe && .\main.exe"
Collapse
 
mcascone profile image
Max • Edited
function run { 
   'g++ -g **.cpp -o main.exe && .\main.exe' | Invoke-Expression 
}
Enter fullscreen mode Exit fullscreen mode