✨👀✨
This commit is contained in:
@ -108,7 +108,7 @@ ALERT_COLOR=#FF0000
|
|||||||
|
|
||||||
const prompt = () => {
|
const prompt = () => {
|
||||||
if (xtermRef.current) {
|
if (xtermRef.current) {
|
||||||
xtermRef.current.write(`\r\nroot@ixabatasha:${currentPath.current}# `);
|
xtermRef.current.write(`\r\nroot@ixabatasha.life:${currentPath.current}# `);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -204,17 +204,17 @@ ALERT_COLOR=#FF0000
|
|||||||
case 'help':
|
case 'help':
|
||||||
// Display available commands and tips
|
// Display available commands and tips
|
||||||
const helpText =
|
const helpText =
|
||||||
"Available Commands:\n" +
|
"Available Commands:\r\n" +
|
||||||
" ls List directory contents\n" +
|
" ls List directory contents\r\n" +
|
||||||
" cd <directory> Change directory\n" +
|
" cd <directory> Change directory\r\n" +
|
||||||
" cat <file> Display file contents\n" +
|
" cat <file> Display file contents\r\n" +
|
||||||
" clear Clear the screen\n" +
|
" clear Clear the screen\r\n" +
|
||||||
" help Display this help message\n\n" +
|
" help Display this help message\r\n\r\n" +
|
||||||
"Tips:\n" +
|
"Tips:\r\n" +
|
||||||
"- Use Tab for command/path completion\n" +
|
" - Use Tab for command/path completion\r\n" +
|
||||||
"- Up/Down arrows navigate command history\n" +
|
" - Up/Down arrows navigate command history\r\n" +
|
||||||
"- Type 'cat /usr/bin/common_commands.txt' for more system information\n" +
|
" - Type 'cat /usr/bin/common_commands.txt' for more system information\r\n" +
|
||||||
"- Read the README.txt for mission details";
|
" - Read the README.txt for mission details";
|
||||||
|
|
||||||
xtermRef.current.write('\r\n' + helpText);
|
xtermRef.current.write('\r\n' + helpText);
|
||||||
break;
|
break;
|
||||||
@ -277,7 +277,7 @@ ALERT_COLOR=#FF0000
|
|||||||
historyIndex.current--;
|
historyIndex.current--;
|
||||||
// Clear current line and write prompt + history item
|
// Clear current line and write prompt + history item
|
||||||
xtermRef.current.write('\x1b[2K\r');
|
xtermRef.current.write('\x1b[2K\r');
|
||||||
xtermRef.current.write(`root@ixabatasha:${currentPath.current}# `);
|
xtermRef.current.write(`root@ixabatasha.life.life:${currentPath.current}# `);
|
||||||
xtermRef.current.write(commandHistory.current[historyIndex.current]);
|
xtermRef.current.write(commandHistory.current[historyIndex.current]);
|
||||||
currentLine.current = commandHistory.current[historyIndex.current];
|
currentLine.current = commandHistory.current[historyIndex.current];
|
||||||
}
|
}
|
||||||
@ -286,14 +286,14 @@ ALERT_COLOR=#FF0000
|
|||||||
historyIndex.current++;
|
historyIndex.current++;
|
||||||
// Clear current line and write prompt + history item
|
// Clear current line and write prompt + history item
|
||||||
xtermRef.current.write('\x1b[2K\r');
|
xtermRef.current.write('\x1b[2K\r');
|
||||||
xtermRef.current.write(`root@ixabatasha:${currentPath.current}# `);
|
xtermRef.current.write(`root@ixabatasha.life.life:${currentPath.current}# `);
|
||||||
xtermRef.current.write(commandHistory.current[historyIndex.current]);
|
xtermRef.current.write(commandHistory.current[historyIndex.current]);
|
||||||
currentLine.current = commandHistory.current[historyIndex.current];
|
currentLine.current = commandHistory.current[historyIndex.current];
|
||||||
} else if (historyIndex.current === commandHistory.current.length - 1) {
|
} else if (historyIndex.current === commandHistory.current.length - 1) {
|
||||||
historyIndex.current++;
|
historyIndex.current++;
|
||||||
// Clear current line and write just the prompt
|
// Clear current line and write just the prompt
|
||||||
xtermRef.current.write('\x1b[2K\r');
|
xtermRef.current.write('\x1b[2K\r');
|
||||||
xtermRef.current.write(`root@ixabatasha:${currentPath.current}# `);
|
xtermRef.current.write(`root@ixabatasha.life.life:${currentPath.current}# `);
|
||||||
currentLine.current = "";
|
currentLine.current = "";
|
||||||
}
|
}
|
||||||
} else if (domEvent.key === 'Tab') {
|
} else if (domEvent.key === 'Tab') {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
import TerminalComponent from '../components/Terminal.tsx';
|
import TerminalComponent from '../components/Terminal.tsx';
|
||||||
const title = "Secret Terminal";
|
const title = "root@ixabatasha.life";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Escape Room Terminal Puzzle
|
Escape Room Terminal Puzzle
|
||||||
|
Reference in New Issue
Block a user