Gzz::Readline — README

Table of Contents

NAME

Gzz::Readline

AUTHOR

Francis Grizzly Smit ([email protected])

VERSION

1.0.12

TITLE

Gzz::Readline

SUBTITLE

A Raku module to do basic prompting with editing and like readline but with the ability to prefill the value.

COPYRIGHT

LGPL V3.0+ LICENSE

Top of Document

Introduction

A Raku module to do basic prompting with editing and like readline but with the ability to prefill the value.

NB: I use the NativeCall module to get at a C library gzz_readline.so which is a fork of the readline library, I had to fork it as it doesn't normally allow you to prefill the value

NOTE: This prompt package is based on gnu readline.

I have modified the Readline C code to provide the required .so files. The only difference is that it supports prefilling the edit buffer with text to edit, so it is easier to fix your mistakes and/or start with the previous value or whatever value the developer wants to supply. It's licence is GPL v3 or above, enjoy.

class Gzz_readline

class Gzz_readline is export 

   sub LIBGZZ_READLINE {
        ....
        .....
    }

    #
    # gzz_readline functions.
    #
    sub gzzreadline( Str, Str ) is export returns Str
        is native( LIBGZZ_READLINE ) { * }

    method gzzreadline(Str:D $prompt, Str:D $prefill) returns Str {
        gzzreadline( $prompt, $prefill )
    }

}

Top of Document

Gzz::Readline v1.0.12

Extension to Gnu Readline to get a prompt with a default value

Authors

  • Francis Grizzly Smit

License

LGPL-3.0-or-later

Dependencies

Distribution::Builder::Cmake-altP5readlinkPod::To::HTMLPod::To::ManPod::LoadTest::OutputTemplate::Mustache

Test Dependencies

Provides

  • Gzz::Readline

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.