Skip to content

carapace _caraspace | Out-String | Invoke-Expression #2409

Open
@pa-0

Description

@pa-0

Current Behavior

When PowerShell attempts to load the default $PROFILE, the following error is returned:

expected one of 'bash', 'bash-ble', 'elvish', 'export', 'fish', 'ion', 'nushell', 'oil', 'powershell', 'tcsh', 'xonsh', 'zsh' [was: ]
Invoke-Expression: C:\Users\XXXX\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:266
Line |
 266 |  carapace _carapace | Out-String | Invoke-Expression
     |                                    ~~~~~~~~~~~~~~~~~
     | Cannot bind argument to parameter 'Command' because it is an empty string.
Loading personal and system profiles took 24758ms.

Expected Behavior

The $PROFILE loads correctly.

Steps To Reproduce

  1. Follow carapace setup instructions exactly after running winget install from Admin prompt.
  2. Copy and paste code block into default "...PowerShell_profile.ps1" file.
  3. Run PowerShell.

Version

7.5.0-preview.3

OS

  • Linux
  • OSX
  • Termux
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

~/.config/powershell/Microsoft.PowerShell_profile.ps1

$env:CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' # optional
Set-PSReadLineOption -Colors @{ "Selection" = "`e[7m" }
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
carapace _carapace | Out-String | Invoke-Expression


And now that I'm reading it, I'm thinking that optional line does not apply since I do not have zsh, fish or inshellisense installed. 🤦🏽‍♂️ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions