How to enable vim, vi, and nano to work in Xterm.js? #5163
Unanswered
RamanKharchee
asked this question in
Q&A
Replies: 1 comment
-
With
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am developing a web-based terminal in a Next.js application. The frontend communicates with an API (
/api/socket
) that opens a WebSocket session with a Go application. The Go application establishes a WebSocket connection to a Kubernetes Pod usingkubectl exec
. While basic commands likeping
,ls
, andcd
work fine, commands such asvi
,vim
, andnano
are not functioning as expected in Xterm.js. How can I make these commands work properly?The Terminal component supports navigating through previously executed commands using the up/down arrow keys. It also handles Ctrl+C or Ctrl+Z to exit commands like ping. Additionally, the component uses the FitAddon to enable copy and paste functionality.
Here is my terminal component
Here is my socket.js API
The Go WebSocket successfully returns the response for the ls -al command, providing the detailed directory listing.
Beta Was this translation helpful? Give feedback.
All reactions