Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created April 19, 2017 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/48d990de7a76404135942990ad578cf9 to your computer and use it in GitHub Desktop.
Save zoffixznet/48d990de7a76404135942990ad578cf9 to your computer and use it in GitHub Desktop.
zoffix@VirtualBox:~$ echo 'use nqp; BEGIN REPL.^lookup("history-file").wrap: method (\SELF:--> Str:D) { my $hs = nqp::getattr(nqp::decont(SELF), REPL, q|$!history-file|); return $hs.absolute if $hs.defined; $hs = $*ENV<RAKUDO_HIST> ?? $*ENV<RAKUDO_HIST>.IO !! $*HOME.add(".perl6/rakudo-history"); note "Cannot load history: {.exception.message}" without mkdir $hs.parent; nqp::bindattr(nqp::decont(SELF), REPL, q|$!history-file|, $hs); $hs.absolute }' | perl6
You may want to `zef install Readline` or `zef install Linenoise` or use rlwrap for a line editor
To exit type 'exit' or '^D'
> Routine::WrapHandle.new
> Invocant requires an instance of type IO::Handle, but a type object was passed. Did you forget a .new?
> zoffix@VirtualBox:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment