Page 1 of 1

LineEditor 2.80

Posted: Tue Dec 01, 2026
by JonAbbott
LineEditor provides command-line history at command prompts (eg. Supervisor, BASIC etc.)
It is 26/32bit neutral and runs on RISC OS 3.1x to RISC OS 5.x

Install via PackMan or manually run LineEditor from the attachment below. To run at boot, copy LineEditor to !Boot.Choices.Boot.Tasks

Changes:
  • increased the temporary buffer size from 256 to 1024 (tmpbuf / tmpbuf_limit)
  • added buffer limits to strcpy to avoid buffer overruns
  • now handles potential redirection errors returned by OS_ReadC (Richard Coleman)
  • commented out all PRINT statements
  • improved the legibility of flagged responses (Alias, Command etc)
  • stripped out more unused code
  • exit *SaveHistory cleanly if an error occurs when saving the file
  • increased max path length to 1024
  • removed custom PrettyPrint dictionary and all use of PrettyPrint
  • removed the code based *command help
  • fixed an Abort when stepping back to find the leafname if the commandline is initiall blank
  • Fn key expansion changed to handle overlapping Fn keys
  • Fn key expansion changed to use OS_GSTrans so it can expand the buffer if its not large enough
  • when copying the current command, the string is terminated early if it exceeds the buffer
Key combinations
Escape or Ctrl-[Abandon current line and do not insert in buffer
Tab or Ctrl-IFilename completion (beeps if no match)
InsertToggle insert and overtype modes for one line only
CopyAllow normal screen copying for one line only
Shift-InsertClear and remove single line from history
Shift-DeleteDelete character directly under cursor
Ctrl-DeleteClear line and erase entire history
Cursor UpCycle backwards through previous commands
Cursor DownCycle forwards through previous commands
Cursor LeftMove cursor one character to the left
Cursor RightMove cursor one character to the right
Shift-Cursor LeftMove cursor to end of previous word
Shift-Cursor RightMove cursor to start of next word
Ctrl-Cursor UpRecall the oldest previous command
Ctrl-Cursor DownRecall the newest previous command
Ctrl-Cursor LeftMove cursor to start of line
Ctrl-Cursor RightMove cursor to end of line
Backspace or Ctrl-HIdentical to Delete
Ctrl-J or Ctrl-MIdentical to Return
Ctrl-UClear entire line
~<substring>recalls command whose start uniquely matches <substring>

Substring Recall
You can recall a command, providing the start of the command matches <substring>

For example, if the following commands were used previously:
*Help Commands
*Mount 0
*Info *
PRINT"HELLO"

~<substring> can recall as follows:
~P will recall PRINT"HELLO"
~*M will recall *Mount 0
~*h will recall *Help Commands because the system is case insensitive

If there is no recall match when RETURN is pressed, then the leading tildes are stripped off and the command is executed as if the tildes weren't specified.