diff --git a/functions/__kube_prompt.fish b/functions/__kube_prompt.fish index dc2be49..25d0c26 100644 --- a/functions/__kube_prompt.fish +++ b/functions/__kube_prompt.fish @@ -22,10 +22,13 @@ function __kube_ps_update_cache end function __stat_mtime + # Get installed python executable + set python (which -a python python2 python2.7 python3 python3.6 | head -n 1) + #-- cross-platform workaround; POSIX didn't specify stat(1) and so #-- its interface is incompatibly different on Mac OS and Linux. #-- see https://unix.stackexchange.com/q/561927/3097 - python -c "print(__import__('os').stat(__import__('sys').argv[1]).st_mtime)" $argv + $python -c "print(__import__('os').stat(__import__('sys').argv[1]).st_mtime)" $argv end set -l kubeconfig "$KUBECONFIG"