9 Commits
Author SHA1 Message Date
Eduardo Casadei 78085e276d LibShell: Stop reading error source text directly from the source file
Use the saved source text instead of trying to read it directly from the
source file, as the source file may be a relative path and the script
could have changed the current working directory which would make the
path invalid.
2026-11-02 09:33:46 +01:00
Eduardo Casadei 47b533f8d8 LibShell: Save the source text for script files
The function for running a script file already reads its source data
into a buffer, so also set the source text to it.
2026-11-02 09:33:46 +01:00
Eduardo Casadei b2b6f02449 LibShell: Display the source file path on errors
Includes the source file path with line and collumn numbers in the error
messages and also corrects the shown line number to start at 1 instead
of 0.
2026-10-31 22:27:38 +01:00
Ali Mohammad Pur 9ccfb1353d LibShell: Restore suspended job terminal modes 2026-08-27 16:08:33 +02:00
Sönke Holz 53d4d65bd1 LibShell: Increase program-aware completion timeout
The old timeout was too low when running in riscv64 QEMU (with TCG).
2025-06-23 21:02:45 +02:00
Ali Mohammad Pur 8b97210a91 Shell: Don't use uninitialized termios data
1c7233f148 broke this by moving the
initialization later, while still having the shell use the invalid
termios data.
Also, this commit makes it so *only* the init script is run without the
termios populated, as 'Shell -c ...' should still behave like running
the command in the shell.
2025-06-01 01:07:42 +02:00
Ali Mohammad Pur 95df87fbed LibShell: Clear the initial prompt line
This fixes a rendering issue where the first line of the prompt
overwrites a line with "% ...", which leaves the "%" in the terminal
if the prompt starts with "\n".
2024-11-18 21:00:53 +01:00
Liav A. 20982a02d5 Userland: Declare a reduced version of LibShell
As a preparation for the next commit, we now have a reduced version of
LibShell which can be used with BuggieBox. That version will not include
LibSyntax, LibURL or LibCodeComprehension, which are all quite heavy for
BuggieBox to include in its own binary.
2024-10-04 10:56:27 +02:00
Liav A. d46be35f3f Userland: Move Shell code to be in a library directory
This change ensures that users can use LibShell easily understand this
library now, because we have an actual library directory.

In addition to that, we move the test scripts to Tests/LibShell, to
match the usual pattern of putting test-related files in the Tests/
directory.
2024-10-04 10:56:27 +02:00