denisidoro/navi

commands that generate a list of possible values fails in powershell on Windows: Unexpected token 'NAVIEOF'

papanito opened this issue · 4 comments

Describe the bug
Running navi on Windows in powershell, using "commands that generate a list of possible values" does not work as expected in powershell under Windows and returns

Unexpected token 'NAVIEOF'

To Reproduce

  1. Create and import the following cheat file

    % kubernetes, k8s
    
    $ context: kubectl config get-contexts --- --column 2 --header-lines 1
    $ namespace: kubectl get ns --context $context --- --column 1 --header-lines 1
    
    # Check disk space on pod
    
    kubectl exec -it --context <context> -n <namespace> <pod_name> -- sh -c "df -h"
    
  2. Configure navi to use powershell as suggested here and here

    shell:
      command: powershell
      finder_command: powershell
  3. Run navi and select the command defined above

  4. The command queries for the contexts which results in a correct list

    image

    However, on the top I can see the following error

    image

Expected behavior
I don't see an error and can continue with the selected value

Screenshots
See above

Versions:

  • OS: Windows Server 2019
  • Shell Version
    $PSVersionTable
    
    Name                           Value
    ----                           -----
    PSVersion                      5.1.17763.2867
    PSEdition                      Desktop
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    BuildVersion                   10.0.17763.2867
    CLRVersion                     4.0.30319.42000
    WSManStackVersion              3.0
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    

Additional context
N/A

Unfortunately I don't have a Windows machine and can't reproduce the problem. I'll mark this with "help needed", hoping that someone else will be able to tackle it.

4Kp3n commented

I am experiencing the same problem.
Did you maybe find a workaround for this @papanito ?