navi icon indicating copy to clipboard operation
navi copied to clipboard

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

Open papanito opened this issue 2 years ago • 3 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

papanito avatar May 30 '22 12:05 papanito

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.

denisidoro avatar Jul 11 '22 10:07 denisidoro

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

4Kp3n avatar Feb 05 '24 18:02 4Kp3n