Add inshellisense as plugin for powershell not working
Describe the bug
Run the command is init powershell >> $profile for PowerShell didn't work as expected, when I started the new PowerShell, I saw plenty of bugs repeatedly:
A bug sample:
The term '' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\test\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:3 char:1 +
- ~
- CategoryInfo : ObjectNotFound: (:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
To Reproduce Steps to reproduce the behavior:
- Go to PowerShell
- Run the command
is init powershell >> $profile - Try to open a new PowerShell
- See error and inshellisense will not get activated
Expected behavior Expect the script to run normally without error and inshellisense to get activated
Environment
- OS: Window 10
- Output of
is --version: 0.0.1-rc.16 - Nodejs Version: 16.20.2
- Shell: PowerShell
- Shell Version: [e.g. 5.2.21] 5.1.19041.4894
Additional context
inshellisense still works normally when I type is in any PowerShell, just got the error when I tried to run that command above to start automatically inshellisense whenever I open a new PowerShell
I have a similar problem but with bash standalone, and bash in vscode integrated terminal. I did is init bash >> ~/.bashrc and I can see the script it put into ~.bashrc but when opening a new vscode integrated bash terminal or a standalone bash, the inshellisense isn't autostarted. No errors though.
@thovo this is an issue with my docs actually. the command should is init powershell | Add-Content $profile not is init powershell >> $profile. If you open up your $profile, you'll see lots of null characters.
So basically we just need to update the command and it will work? 😄