inshellisense icon indicating copy to clipboard operation
inshellisense copied to clipboard

Add inshellisense as plugin for powershell not working

Open thovo opened this issue 1 year ago • 1 comments

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:

  1. Go to PowerShell
  2. Run the command is init powershell >> $profile
  3. Try to open a new PowerShell
  4. 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

thovo avatar Sep 20 '24 20:09 thovo

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.

yCodeTech avatar Oct 03 '24 21:10 yCodeTech

@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.

cpendery avatar Nov 04 '24 17:11 cpendery

So basically we just need to update the command and it will work? 😄

thovo avatar Nov 04 '24 17:11 thovo