2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-07-02 01:02:03 +00:00
Hilbish/docs/api/readline.md
2025-06-12 23:27:39 -04:00

1.3 KiB

title description layout menu
Module readline Package readline is a pure-Go re-imagining of the UNIX readline API doc
docs
parent
API

Introduction

This package is designed to be run independently from murex and at some point it will be separated into it's own git repository (at a stage when I am confident that murex will no longer be the primary driver for features, bugs or other code changes)

line reader library The readline module is responsible for reading input from the user. The readline module is what Hilbish uses to read input from the user, including all the interactive features of Hilbish like history search, syntax highlighting, everything. The global Hilbish readline instance is usable at hilbish.editor.

Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.

Putting a terminal into raw mode is the most common requirement:

oldState, err := terminal.MakeRaw(0)
if err != nil {
        panic(err)
}
defer terminal.Restore(0, oldState)

Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.

Putting a terminal into raw mode is the most common requirement:

oldState, err := terminal.MakeRaw(0)
if err != nil {
        panic(err)
}
defer terminal.Restore(0, oldState)