kubectx icon indicating copy to clipboard operation
kubectx copied to clipboard

git bash windows fzf error

Open cloud-66 opened this issue 2 years ago • 4 comments

image

Never mind how kubectx (golang version) installed, by downloading binary or by scoop kubectx (Enter) it works in powershell, but don't in git bash for windows. I guess because path should be in bash format /c/Users/Cloud/scoop/shims/kubectx

cloud-66 avatar Mar 03 '23 16:03 cloud-66

Yeah this is an interesting case. We pass kubectx's full path to fzf, I wonder if we should if-else this for mingw.

ahmetb avatar Mar 03 '23 16:03 ahmetb

I'm observing the same problem while running kubectx in Git Bash session in Windows Terminal:

image

but if I switch to PowerShell in the same Windows Terminal, then it works:

image

If I switch to plain Start > Git Bash, and not in Windows Terminal, then everything works:

image

Environment: I tend to install everything with winget:

$ kubectx --version
0.9.4
$ fzf --version
0.39.0 (2023040)

I'm observing the same problem with kubens. See also #307

mloskot avatar Apr 06 '23 10:04 mloskot

Update to my https://github.com/ahmetb/kubectx/issues/382#issuecomment-1498810043

In Git Bash in Windows Terminal, interestingly, if I pipe kubectx | fzf:

image

then I get no error, but this

image

But, selecting context and ENTER seems to have no effect.

mloskot avatar Apr 07 '23 10:04 mloskot

@cloud-66 See https://github.com/ahmetb/kubectx/issues/330#issuecomment-1506657091 for working workaround

mloskot avatar Apr 13 '23 09:04 mloskot