Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
hookenz committed May 16, 2024
1 parent 84f31f8 commit 6bc8af4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 190,22 @@ angular.module('portainer.docker').controller('ContainerConsoleController', [
let commandBuffer = '';

$scope.state = states.connected;
term = new Terminal();

if (isLinuxTerm) {
// linux terminals support xterm
socket.send('export TERM="xterm-256color"\n');
socket.send('export LANG=C.UTF-8\n');
socket.send('export LC_ALL=C.UTF-8\n');
socket.send('export TERM="xterm-256color"\n');
socket.send('alias ls="ls --color=auto"\n');
socket.send('echo -e "\\033[2J\\033[H"\n');
}

term = new Terminal();
term.onData(function (data) {
socket.send(data);

// This code is detect whether the user has typed CTRL D
// or exit in the terminal
// This code is detect whether the user has
// typed CTRL D or exit in the terminal
if (data === '\x04') {
// If the user types CTRL D, close the terminal
closeTerminal = true;
Expand Down

0 comments on commit 6bc8af4

Please sign in to comment.