microsoft / inshellisense

IDE style command line auto complete
MIT License
8.39k stars 186 forks source link

fix: use active profile for pwsh/powershell to support one drive directories #25

Closed cpendery closed 11 months ago

cpendery commented 11 months ago

Description

Load the profile dynamically from pwsh/powershell in order to support OneDrive based $profile's.

Testing

Closes #4

AmirRezaei commented 11 months ago

Still getting error:

Select your desired shell for keybinding creation bash zsh fish

powershell pwsh node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

[Error: ENOENT: no such file or directory, open 'C:\Users\itkom\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\Users\user1\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1' }

Node.js v21.1.0

cpendery commented 11 months ago

Still getting error:

Select your desired shell for keybinding creation bash zsh fish

powershell pwsh node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

[Error: ENOENT: no such file or directory, open 'C:\Users\itkom\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\Users\user1\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1' }

Node.js v21.1.0

@AmirRezaei did you build/link it locally?

AmirRezaei commented 11 months ago

Still getting error: Select your desired shell for keybinding creation bash zsh fish

powershell pwsh node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

[Error: ENOENT: no such file or directory, open 'C:\Users\itkom\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\Users\user1\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1' } Node.js v21.1.0

@AmirRezaei did you build/link it locally?

I used "npm install -g @microsoft/inshellisense"

cpendery commented 11 months ago

Still getting error: Select your desired shell for keybinding creation bash zsh fish

powershell pwsh node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

[Error: ENOENT: no such file or directory, open 'C:\Users\itkom\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\Users\user1\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1' } Node.js v21.1.0

@AmirRezaei did you build/link it locally?

I used "npm install -g @microsoft/inshellisense"

Ah, @AmirRezaei I haven't published a new release since I merged this fix. That'll be up shortly 0.0.1-rc.2 and you should be able to see it working then

AmirRezaei commented 11 months ago

Still getting error: Select your desired shell for keybinding creation bash zsh fish

powershell pwsh node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

[Error: ENOENT: no such file or directory, open 'C:\Users\itkom\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\Users\user1\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1' } Node.js v21.1.0

@AmirRezaei did you build/link it locally?

I used "npm install -g @microsoft/inshellisense"

Ah, @AmirRezaei I haven't published a new release since I merged this fix. That'll be up shortly 0.0.1-rc.2 and you should be able to see it working then

Thank you!