Closed nareshku closed 2 years ago
Interesting. Which version of zsh are you using? I am running Linux and tested on different distributions without that issue:
$ zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)
testuser at dev-box in ~
$ zstat +mtime -F %s.%N ~/.kube/config
1658946238.553962684
testuser at dev-box in ~
$
zsh --version
zsh 5.0.2 (x86_64-redhat-linux-gnu)
Wow, ok. This version was released almost 10 years ago: 2012-12-21. I assume you are on an older version of RHEL? The nanosecond precision was introduced around version 5.5. I will add a condition for older versions of ZSH but would definitely suggest upgrading your shell at some point.
I also got this issue:
_kube_ps1_file_newer_than:15: division by zero
zsh --version
zsh 5.0.2 (x86_64-redhat-linux-gnu)
Using kube-ps1 on my Linux machine with zsh and found that
zstat
doesn't output nanoseconds leading to error_kube_ps1_file_newer_than:16: division by zero
Full output of zstat
We should probably get the OS type and convert command
zstat +mtime -F %s.%N
tozstat +mtime -F %s
if it is Linux here