Fix browser terminal paste for hosting clients.
Deploy Ladill Hosting / deploy (push) Successful in 42s
Deploy Ladill Hosting / deploy (push) Successful in 42s
Use bracketed paste, reliably bind paste capture, stop blocking mousedown focus, and give shells a short prompt with horizontal-scroll readline so long pasted commands do not wrap incorrectly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -183,6 +183,14 @@ class RunHostingTerminalWorkerCommand extends Command
|
||||
? $homeDirectory
|
||||
: $homeDirectory.$relativePath;
|
||||
|
||||
// Short \W prompt + bracketed paste keep long pasted commands readable in
|
||||
// the narrow browser terminal used by all hosting clients.
|
||||
$inputrc = implode("\n", [
|
||||
'set enable-bracketed-paste on',
|
||||
'set horizontal-scroll-mode on',
|
||||
'set blink-matching-paren on',
|
||||
]);
|
||||
|
||||
return implode('; ', [
|
||||
'export HOME='.escapeshellarg($homeDirectory),
|
||||
'export USER='.escapeshellarg($account->username),
|
||||
@@ -192,7 +200,9 @@ class RunHostingTerminalWorkerCommand extends Command
|
||||
'export COLORTERM=truecolor',
|
||||
'export COLUMNS='.(int) $cols,
|
||||
'export LINES='.(int) $rows,
|
||||
'export PS1='.escapeshellarg($account->username.'@ladill:\w\$ '),
|
||||
'export PS1='.escapeshellarg($account->username.'@ladill:\W\$ '),
|
||||
'printf %s '.escapeshellarg($inputrc).' > /tmp/ladill-term-inputrc-$$',
|
||||
'export INPUTRC=/tmp/ladill-term-inputrc-$$',
|
||||
'cd '.escapeshellarg($workingDirectory).' 2>/dev/null || cd '.escapeshellarg($homeDirectory),
|
||||
'stty rows '.(int) $rows.' cols '.(int) $cols.' echo 2>/dev/null || true',
|
||||
'exec /bin/bash --noprofile --norc -i',
|
||||
|
||||
Reference in New Issue
Block a user