When configuring using `p10k configure`, it will jump directly to 'Show current time?'
FoundAdd opened this issue · 5 comments
I installed zsh and ohmyzsh on Ubuntu Server 22.04, and used xshell to connect to the server via ssh, and then installed p10k according to the installation prompts of powerlevel10k. But when I perform initial configuration and use p10k configure
to configure, the program skips the selection of configuration items such as characters and prompts, and jumps directly to the option 'Show current time?'
What should I do to configure it like in other shells? Is this situation related to the fact that the Ubuntu Server system I am using only has a console but no GUI desktop?
Hm, not quite sure if this is the case but might be an issue with tty/interactivity. Could you try forcing a tty with ssh -tt server
?
For @Syphdias
Hm, not quite sure if this is the case but might be an issue with tty/interactivity. Could you try forcing a tty with
ssh -tt server
?
Since xshell does not seem to support specifying the -tt
parameter, I changed the connection tool. In another tool I successfully logged in using ssh -tt server
and completed the configuration of the previously mentioned content using p10k configure
.
For @romkatv
I read the relevant content pointed to by the URL, and it was verified that there was indeed a problem with the connection tool I was using.
When executing print -P '%F{#ff0000}red%f'
the result is a very ordinary text content 'red',
when executing print $terminfo[colors]
the result is 8 instead of 256 .
When I chose another tool, even without using the -tt
parameter, I no longer had this problem.
Thanks for your help in finding the cause of this issue!
I didn’t realize xshell was not just a terminal emulator but also the ssh client (akin to putty, I guess).
The argument -tt
is only valid for ssh
. From the man page:
-t' Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.
As I understand that wasn’t even the problem since you were able to do something at all in the wizard.
Also, not sure if that is what you did but don‘t try arguments for one tool with another tool. That can be dangerous!
I didn’t realize xshell was not just a terminal emulator but also the ssh client (akin to putty, I guess). The argument
-tt
is only valid forssh
. From the man page:-t' Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.
As I understand that wasn’t even the problem since you were able to do something at all in the wizard.Also, not sure if that is what you did but don‘t try arguments for one tool with another tool. That can be dangerous!
Yeah, thanks for the reminder. I just don’t know the cause of this problem. After finding the reason, although xshell
does not support specifying the argument -tt
, I specified its Terminal Type
as xterm-256color
, and now it works fine Work.