matchai / spacefish

🚀🐟 The fish shell prompt for astronauts
https://spacefish.matchai.dev
MIT License
963 stars 79 forks source link

Kubernetes included with Docker 18.09 sets the kubectl-section to always be enabled #111

Closed MindTooth closed 5 years ago

MindTooth commented 5 years ago

Bug Report

Current Behavior With the recently released Docker 18.09 (Version 2.0.0.0-mac78), I experience that the Kubernetes section is always enabled. The reason for that is Kubernetes is now included with Docker, and the kubectl command is therefore always present. The current check is only wether if the command is present or not.

Expected Behavior The prompt added with https://github.com/matchai/spacefish/pull/76 should only be visible when needed. Inside a config folder (Dockerfile, etc. Don't know how Kube works.)

Environment

Possible Solution

Only load the section when needed.

Additional context/Screenshots

Add any other context about the problem here. If applicable, add screenshots to help explain.

screenshot 2018-11-23 at 16 17 03
matchai commented 5 years ago

It looks to me like this same issue would occur on spaceship with the latest version of Docker. I think it would be best if we let them address it first.

++ @salmanulfarzy in case they want to open an issue

matchai commented 5 years ago

Upon further investigation, it looks like this same issue doesn't occur on Spaceship ZSH 3.8.1 (latest right now). I'll see if I can find the cause of the problem. 🕵️

matchai commented 5 years ago

Looks I missed a bit of logic when reading over the spaceship implementation. 😅 Should be quickly fixed with the upcoming PR.

Sorry for the wait!