microsoft / inshellisense

IDE style command line auto complete
MIT License
8.24k stars 181 forks source link

inshellisense bind does not work when powershell config file is within onedrive #4

Closed ggayan closed 8 months ago

ggayan commented 8 months ago

Describe the bug image

AmirRezaei commented 8 months ago

Same problem here. Running PS-Version 7.3.

philibertperusse commented 8 months ago

Same issue, I tracked down the problem to 'utils\bindings.js' where the path built from using os.homedir(). For the bind, to support properly with OneDrive, it should query poweshells $PSScriptRoot variable to get proper start directory.

It is quite easy to "fix" manually the bind operation by creating the folder C:\Users[User]\Documents\WindowsPowershell, then calling 'is bind' again, then moving the lines from the .ps1 created there, into a file of the same name in the OneDrive location, then it will work.