DEV Community

Cover image for Add a Bash-like autocomplete to your PowerShell

Add a Bash-like autocomplete to your PowerShell

Felix Haus on December 27, 2019

I mostly use Ubuntu or MacOS for development, but recently I switched sides because I needed the power from my Windows gaming machine to start play...
Collapse
 
kudostoy0u profile image
Kudos Beluga

Over a year later and this works great!
My terminal experience just got even more convenient :)
img

Collapse
 
ofhouse profile image
Felix Haus

Oh yeah, time flies 😁
Great to hear that it still works!

Collapse
 
robsonsobral profile image
Robson Sobral

Thank you! Thank you so much! Now I need to find a way to auto complete SSH config hosts. Thank you!

Collapse
 
robsonsobral profile image
Robson Sobral
Collapse
 
robsonsobral profile image
Robson Sobral
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
Collapse
 
minus20 profile image
Mikhail

I really missed this feature. Thank you.

Collapse
 
selami12q profile image
Таисия Рыбакahyh

I can't even begin how much I'm happy about this. Love you, really lots of love haha <3.

Collapse
 
ofhouse profile image
Felix Haus

Haha, thanks for your kind words! 💓

Collapse
 
bglamadrid profile image
Benjamin La Madrid • Edited

Fast-forward to December 7th, 2022
The steps described in this guide still work like a charm. This autocompletion feature totally beats the default one.

Thank you so much!

Collapse
 
devpbrilius profile image
Povilas Brilius

Strange, it doesn't offer oh-my-zsh like style completion.

Collapse
 
matthiasbaldi profile image
Matthias Baldi

thanks for that 👌
implemented this together with a theme and the new windows terminal
gist.github.com/matthiasbaldi/6f4f...