Skip to main content

Autocompletion

Autocompletion is a convenient command line feature for displaying suggestions when pressing the TAB button.

tuna completion powershell | Out-String | Invoke-Expression

To test, type tuna and press the TAB button several times.

To save settings for future sessions, follow these steps:

  1. Open PowerShell as Administrator and run the command to allow running custom scripts in the shell:
Set-ExecutionPolicy RemoteSigned

Answer the question with: A (Yes to All).

  1. Open a new PowerShell window as your user and run the commands one by one:
if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) { New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force }
Add-Content $PROFILE.CurrentUserAllHosts "tuna completion powershell | Out-String | Invoke-Expression"

Or you can edit the file using a text editor:

notepad $PROFILE.CurrentUserAllHosts

Adding the line:

tuna completion powershell | Out-String | Invoke-Expression