Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable notebook mode #6405

Closed
roeniss opened this issue Dec 15, 2020 · 10 comments · Fixed by #6429
Closed

Can't disable notebook mode #6405

roeniss opened this issue Dec 15, 2020 · 10 comments · Fixed by #6429

Comments

@roeniss
Copy link

roeniss commented Dec 15, 2020

Describe the bug

image

From this status, I can not make the same page with the readme screenshot :

image

as seen as above, my kui screen looks like work in "notebook mode" (I mean, look at that "In[1]") by default, and I want to use it as "terminal mode" (as same as the second screenshot : "kui >")

Probably this is not a bug rather I missed my way, but there's not much resources that I can look up so I came here. If this bothers you, really sorry about that.

System

  • Kui version: 9.3.1
  • Operating system: macOS 10.15.6
@starpit
Copy link
Contributor

starpit commented Dec 15, 2020

Howdy! From my understanding, you would like the prompt to be your CWD, rather than In[N]?

@roeniss
Copy link
Author

roeniss commented Dec 15, 2020

AyeAye sir! Yes. That's exactly.

@tom342178
Copy link

I am having the same problem, latest version on Mac 11.1. Though the "About" for Kui does not show version anywhere that I can see. I don't think it is just the command prompt, it is a mode problem. In this mode, none of my commands are being interpreted as k8s commands. No special Kui processing.

@starpit
Copy link
Contributor

starpit commented Dec 17, 2020

Hi @tom342178, thanks for the comment. I just tried the latest Kui on macOS 11.1.0 (you can try the version command in Kui to see your version), which as of this writing is 9.3.3. kubectl seems to work on that laptop setup.

When you say "none of my commands are being interpreted as k8s commands" would you be able to provide some specific examples? e.g. is it that kubectl get pods ... does not work at all? Does not have Kui visual enhancements? or? Also, are you using Kui in its full mode, or as a kubectl plugin from your normal terminal?

@starpit
Copy link
Contributor

starpit commented Dec 17, 2020

@roeniss ok great, thanks for the feedback!

@tom342178
Copy link

tom342178 commented Dec 18, 2020

image
@starpit - I am not sure what is going on. This is Kui 9.3.3 on Mac 11.1.

It looks like Kui is not recognizing the completion of the ssh command and therefore never provides a Kui prompt for the next command, even though I am able to interact with the remote host.

I thought it might be related to the password request from the ssh command so I tried to ssh to a local device that uses token and it never returns a new Kui prompt, just the remote system prompt. I have not used Kui for a few months and the old version never had this problem.

@roeniss
Copy link
Author

roeniss commented Dec 18, 2020

I'm sorry but I didn't know how get my prompt not to be notebook style. @starpit I don't want to press you but Isn't it possible on latest build? thanks :)

@starpit
Copy link
Contributor

starpit commented Dec 20, 2020

@tom342178 Thanks for the clarification. I'm not sure how this ever could have worked. If I understand correctly, you are ssh'ing into a remote host. On that host, the oc and kubectl commands will be serviced by the executables running on that remote host. I could see getting this to work, e.g. if you set up your ssh keys so that you did not have to enter a password every time, and did something like alias kubectl=ssh xxx@yyy kubectl... it's possible that then Kui would display read-outs properly. But things like apply -f <someLocalFilePath> would not work. You can ping me on slack to discuss further?

starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure.

Fixes kubernetes-sigs#6405
starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes kubernetes-sigs#6405
starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes kubernetes-sigs#6405
starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes kubernetes-sigs#6405
@starpit
Copy link
Contributor

starpit commented Dec 21, 2020

@roeniss Thanks for the suggestion. We have a PR that would expose a way to configure this, via command. We have delayed this level of configuration mostly because we haven't had the time to design the UI around it. But the command structure should be good to go, and should be released once 9.3.4 is out. Once that happens, the command would be

kuiconfig set prompt CWD

Where "CWD" has special meaning.
set prompt CWD

But you may also use any fixed unicode prompt, e.g.

kuiconfig set prompt \\u2771

(note the double backslash, since one needs to escape kui's command line parser)
set prompt unicode

Screen Shot 2020-12-21 at 11 42 45 AM

Screen Shot 2020-12-21 at 11 43 37 AM

starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes kubernetes-sigs#6405
starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes kubernetes-sigs#6405
starpit added a commit that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes #6405
starpit added a commit to starpit/kui that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes kubernetes-sigs#6405
starpit added a commit that referenced this issue Dec 21, 2020
This introduces a nascent `kuiconfig set/unset/reset` command structure. To set your prompt to be the current working directory, try:

```
kuiconfig set prompt CWD
```

Fixes #6405
@starpit
Copy link
Contributor

starpit commented Dec 21, 2020

9.3.4 is out 🛸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants