netshoot icon indicating copy to clipboard operation
netshoot copied to clipboard

new initial prompt issues

Open TJM opened this issue 4 years ago • 2 comments

Related to #59 (but its closed)

... a few days ago (maybe a week), the container image changed and "delete" stopped working (backspace). That seems to be solved, (perhaps above)... but I still notice two things.

When starting via kubectl...

kubectl run netshoots-${USER}-debug --rm -it --image nicolaka/netshoot
  • It seems to clear screen (not desirable) at startup ... at a minimum it blows away the netshoot logo, it also potentially destroys output I wanted to copy/paste.
  • The prompt is missing its emoji docker whale (and something else?)
 netshoots-tmcneely-debug  ~ 

Screen Shot 2021-03-30 at 4 40 38 PM

rebuilt the docker image from an old (56-fix) branch, and it looks "correct"

older one: Screen Shot 2021-03-30 at 5 10 23 PM

I like the hostname, rather than the root@ part, but I want my whale back :)

TJM avatar Mar 30 '21 22:03 TJM

hey @TJM , I think you might be hitting this issue (https://stackoverflow.com/questions/42271657/oh-my-zsh-showing-weird-character-on-terminal). Can you check if running (https://stackoverflow.com/a/54096652) solves it ?

For the first issue, which terminal are you using ? for me using iterm 2 on mac , it doesn't clear the screen.

Screen Shot 2021-04-02 at 2 01 44 PM

nicolaka avatar Apr 02 '21 19:04 nicolaka

Well, I will say that installing patched fonts seems a bit excessive for a debugging/troubleshooting tool, but as per the stack-overflow, Checking the little checkbox about "built-in powerline glyphs" in the iTerm2 profile did clear up the bogus characters in the prompt... as for the screen clearing.. its not a complete clear screen... its just wiping out a few lines (whatever output before the prompt plus its eating several lines of output before the command... it is not consistent, sometimes it eats 10+ lines before the last prompt, sometimes only a few, I think the difference has to do with how fast the "attach" operation happens. I am connecting to a GKE On Prem instance over VPN.

BEFORE: Screen Shot 2021-04-02 at 2 32 32 PM

AFTER: Screen Shot 2021-04-02 at 2 33 00 PM

  • iTerm2 version: Build 3.4.4
  • kubectl client version:
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-14T05:13:35Z", GoVersion:"go1.15.6", Compiler:"gc", Platform:"darwin/amd64"}
  • Tried it on two versions of K8s...
    • ancient vanilla instance:
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.2", GitCommit:"f6278300bebbb750328ac16ee6dd3aa7d3549568", GitTreeState:"clean", BuildDate:"2019-08-05T09:15:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
  • (less ancient) Anthos GKE OnPrem
Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.6-gke.6600", GitCommit:"cfb955f37f5546d5bf811091337d2025e2a79267", GitTreeState:"clean", BuildDate:"2020-09-17T09:21:09Z", GoVersion:"go1.13.9b4", Compiler:"gc", Platform:"linux/amd64"}

The behavior you show above more closely resembles what I expect.

EDIT: Just tested with a local Talos K8s cluster, running 1.20.x and its fine... too many variables. Is your K8s cluster you are testing against "remote" and what is its version?

~tommy

TJM avatar Apr 02 '21 20:04 TJM