Repository navigation
Troubleshooting
Both spellings work in current code, including --plain: Q asks for
confirmation and Q! exits without asking. A Perl parser error can mean an
older module is being loaded. From your checkout, check:
git pull --ff-only
git log -1 --oneline
perl -Ilib -MApp::AnteREPL -e 'print "$INC{q(App/AnteREPL.pm)}\n"'
perl -Ilib script/anterepl --plainRestart the REPL after updating. The banner alone does not identify a Git revision. If the error persists, include the commit, loaded module path, and exact input. Plain mode has no border or legend, but uses the same commands.
Screen mode now blinks the cursor through timed visibility changes. Update
and restart if an older version only requests a blinking style. Bar versus
block still depends on terminal shape support. The white
border uses Unicode box-drawing characters; select a UTF-8 terminal and a font
that contains them. --plain leaves cursor appearance to the terminal and
omits the border and legend. Extremely small windows also omit the frame.
The legend labels are commands to type with Enter, not Ctrl-key shortcuts. They stay outside editable VRAM and remain visible after CLS.
Q asks for confirmation; Q! exits without asking. QUIT protects unsaved source,
and QUIT! discards it. Ctrl-D exits when AUTO is off and the stored source is
saved. Each interactive exit prints Thank, we hope something good happens to you today! on its own line after restoring the terminal. Batch output has no
farewell.
Bare input is Perl. Use ! pwd, ! env, or ! cat filename for shell commands
available on your system. Use the built-in ENV to inspect and change the
environment of AnteREPL itself. For a persistent directory change, use
CD '/path', CHDIR '/path', or Perl's chdir '/path' or die $!.
String quoting still follows Perl. Write say "hi". AnteREPL can supply a
missing final semicolon on a stored statement; it does not invent quotes.
AUTO is active. Type AUTO OFF at a fresh entry, or press Ctrl-C/Ctrl-D to cancel an
unfinished entry and leave AUTO. STATUS reports the next number and step.
EVAL code can execute immediately while AUTO remains on.
A quote or delimiter is still open. Complete it, or press Ctrl-C to cancel.
Delimiter detection is deliberately limited. For exact source or heredocs,
use EDIT, 10: exact source, or AUTO's : exact source form.
Press ordinary Enter after the closing }. Shift+Enter/Ctrl-N inserts a new
line without submitting. A successful definition produces no output.
If the next command also produces no output, try STATUS. EVAL leaves AUTO
active when it was already on; an ordinary call such as say triple 14 is
then stored quietly. Use AUTO OFF and try the call again. This keeps the
completed function intact.
If STATUS or CLS is absorbed into the entry, press Ctrl-C to cancel it without leaving the REPL. Ctrl-D outside AUTO exits when the stored program has no unsaved changes; it is not a continuation-cancel key in that mode.
An earlier completion bug mistook the end of a prototype such as ($) or
(@) for part of a variable. It could leave E sub ar ($) { say $_[0] }
collecting later commands. Update to the latest code: this complete definition
must submit with one Enter, followed by EVAL ar "ordinary call" printing
ordinary call. Both EVAL s /red/blue/ and EVAL s/red/blue/ also complete.
If a complete definition still stays open, include the terminal, Perl version, and exact screen text in a report. These workflows are covered by terminal tests on Linux, but native Windows remains unverified.
Press Enter while on the edited row. Until submission, only the screen text
has changed. LIST then shows what is actually stored. Insert toggles between
overwrite and insertion; insertion is the default.
Move up to it, edit, and press Enter. The new result replaces that entry's previous output directly underneath it, clearing any leftover result rows. The cursor stays below the new result, at the start of the following command if one exists. No blank spacer is inserted. Later commands remain while they fit; Esc/Ctrl-End returns to fresh input at the bottom. Blank lines printed by Perl remain. This does not undo earlier Perl side effects.
Rows that scroll above the visible screen are gone. PageUp cannot bring them
back. For stored source, use LIST PAUSE, LIST SLOW, or a line range to show
it again. HELP pauses by screenful. Esc/Ctrl-End returns to fresh input.
Smaller cuts cells off; bigger adds empty cells. This is deliberate. Shrinking
warns and keeps one inactive copy. Enlarge to the size in the warning, then
type RECOVER to replace the current screen with that copy. Nothing comes back
automatically, and no code runs during recovery. CLS forgets the copy.
See the graph-paper explanation.
Some of its text went outside the screen. AnteREPL will not run only the
remaining fragment. Re-enter it on a fresh row, recover an intact screen after
enlarging, or put larger code in the numbered program with EDIT.
Use CLS. It clears the display and resize bank while keeping the
numbered program, live variables, %ENV, AUTO, and source undo. LIST shows
the stored source again. CLEAR/NEW erase source; Ctrl-L only redraws.
my is lexical to one evaluation. Use $x = ... or our $x = ... for a value
shared across commands. A whole RUN is one evaluation, so its my variables
work normally across stored lines. RESET switches to a fresh workspace.
RUN evaluates the stored source together in the session's package; it is not a
new Perl process. Script startup assumptions, lexical pragmas, __DATA__, and
other execution-context details may differ. Use !! perl script.pl when you
want ordinary independent script execution in the real terminal.
The implicit terminator is a convenience, not a full Perl parser. Replace that line using a colon after its editing number, or use EDIT. Loading and editing preserve literal source. Completed multiline AUTO entries also preserve their syntax, so include their own statement terminator.
Your GUI editor needs a wait option. For example, set
$ENV{EDITOR} = 'code --wait'. Quote executable paths containing spaces, and
use forward slashes for Windows paths in EDITOR. If the editor exits nonzero
or leaves unreadable/invalid text, the in-memory program stays unchanged.
EDIT changes the in-memory program. Type SAVE afterward. Similarly, EDIT ENV
changes %ENV; use ENV SAVE file to persist that environment snapshot.
Use SAVE, or intentionally discard with LOAD! file / QUIT!. IMPORT
creates an unsaved copy, while LOAD adopts the loaded file. EXPORT writes an
independent script but does not mark the program saved.
Files contain source, not live state. Put initial values or input handling in the program before exporting it. EXPORT adds the default pragmas, but it does not serialize variables or environment settings.
First use ENV SAVE file, ENV LOAD file, or ENV RELOAD file. Reload means
read that file again; it cannot retrieve changes from a parent shell. ENV
RESET restores the startup snapshot. ENV LOAD/RELOAD replace the entire map.
Use an ANSI-capable terminal, Ctrl-L to redraw, or --plain as a fallback.
Native Windows screen mode needs Term::ReadKey and remains unverified there.
Wide/combining glyphs can misalign cursor placement. ! is for captured output;
use !! for an interactive program. Direct Perl system/exec and arbitrary XS
output bypass the screen model.
Piped input uses plain mode. Command errors, incomplete input at EOF, and unsaved source at EOF cause failure. Finish source changes with SAVE or use QUIT! when intentionally discarding them.
Include anterepl --version, perl -V, operating system, terminal, screen or
plain mode, and the shortest input that demonstrates the problem. Report it
in the issue tracker.
REPL commands and subcommands must be uppercase: LIST, AUTO OFF,
LIST SLOW, ENV SET, DUMP, and PEEK. A lowercase list can still call a
Perl function named list. When an immediate
bareword error matches a command, AnteREPL replaces that interpreter error with
a hint: cls gives REPL commands must be uppercase; try, "CLS". It does not
run CLS automatically. Valid keywords such as eval and chdir, defined
functions, and their normal errors retain Perl's meaning. Immediate destination
lists have a separate shorthand grammar. EVAL always
takes literal Perl. During AUTO,
ordinary Perl is stored as source; errors in stored programs retain numbered locations.
Use AUTO OFF, Ctrl-C, or Ctrl-D to end AUTO; auto off is not a command.
Environment names and values keep their case: ENV set reads the variable
named set, while ENV SET name value sets a variable.
Ctrl-C cancels the entry or interrupts running code, then shows exit directions.
Use QUIT to leave after saving, or QUIT! to discard unsaved source. Ctrl-D
also exits when AUTO is off and source is saved. During AUTO, Ctrl-D ends AUTO
instead. This lets you recover from a bad entry without losing the session.
Destructive shortcuts default to No. Type y or yes to approve, or append
! to the shortcut to skip the question: D1! 10, S! demo.pl, Q!.
New values do not ask; replacements do. Editors prepare changes before asking.
Enter, No, Ctrl-D, and Esc in screen mode cancel. Ctrl-C interrupts.
Piped input cannot confirm and never consumes a following line as an answer;
use an explicit forced form there. Full-length commands retain their prior rules.
E reserves the five spaced tags s/a/ar/h/hr for definitions:
E s triple return 3 * shift defines a function. EVAL always evaluates literal
Perl: type EVAL s /old/new/ for a spaced substitution or EVAL ar "value"
for a function whose name matches a tag. Bare Perl keywords and existing
functions retain their normal meaning. Native quote operators also
work as values inside shorthand lists; quote literal operator names such as
"q", "s" when next to delimiters.