Reply:...eadLine(3pm)

πŸ“¦
version 0.42 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Reply::Plugin::ReadLine β€” the 3pm perl manual page, but make it make sense πŸ’–

okay bestie, so this is Reply::Plugin::ReadLine from the perl docs (that 3pm bit? that's just the section it lives in, iykyk). It's a plugin for Reply, and it's the one that makes your REPL actually pleasant to type into. Let's get into it 🫢


✨ NAME ✨

Reply::Plugin::ReadLine β€” use Term::ReadLine for user input πŸ’…

✨ VERSION ✨

version 0.42 ⭐

✨ SYNOPSIS ✨

Here's the vibe, drop this in your .replyrc:

; .replyrc
[ReadLine]
history_file = .hist
history_length = 100

✨ DESCRIPTION ✨

So this plugin uses Term::ReadLine to read lines from the user. And the way that it does this means you get line editing and command history β€” which, genuinely, is the difference between a REPL and a punishment. Obsessed. πŸŽ€

Your history gets persisted between runs, no cap. By default it lives in .reply_history in your application data directory. But if you want it somewhere else? You can change that with the history_file option, easy.

Wanna cap how much of your chaotic typing gets saved? There's the history_length option for that β€” it limits the number of lines written to this file. And setting history_length to 0 will disable writing history to a file entirely. Yes, entirely. Gone. Zero lines. πŸ’€

NOTE: you probably want to install a reasonable Term::ReadLine backend in order for this plugin to be very useful. Term::ReadLine::Gnu is highly recommended if possible. Like, please. Do it for me. πŸ™ˆ

✨ AUTHOR ✨

Jesse Luehrs <doy@tozt.net> πŸ’œ

This software is Copyright (c) 2016 by Jesse Luehrs.

This is free software, licensed under:

The MIT (X11) License

and that's the whole page bestie πŸ¦‹ perl v5.34.0, dated 2022-06-17 β€” yeah it's a lil vintage but it ate, and so will your command history βœ¨πŸ’…πŸŒΈ

πŸ“¦ where this page comes from