module Terminimal

Overview

A tiny CLI toolkit for building terminal apps for humans.

Extended Modules

Defined in:

terminimal.cr
terminimal/ansi.cr

Instance Method Summary

Instance Method Detail

def clear_line(direction = ClearDirection::ToEnd) #

Clears the current line in the direct specified.


[View source]
def clear_screen(direction = ClearDirection::All) #

Clears the screen and resets cursor position to 0,0.


[View source]
def cursor #

Returns Terminimal::Cursor for interaction with the TTY cursor.


[View source]
def exit_with_error(message, status) : NoReturn #

Prints an error message to STDERR and exits.


[View source]
def reset_line #

Clears the current line a respositions the cursor at column 0.


[View source]
def spinner(await : Proc(Bool), style = Spinner::Style::UNI_DOTS, async = false, &message : Proc(String)) : Nil #

Create and display a Spinner to provide user feedback during a long running operation.

The spinner will continue to output the result of evalutation the passed block while await returns true.


[View source]
def spinner(await : Future::Compute, style = Spinner::Style::UNI_DOTS, async = false, &message : Proc(String)) #

ditto


[View source]
def spinner(await : Proc(Bool), style = Spinner::Style::UNI_DOTS, async = false, message = "") #

ditto


[View source]
def spinner(await : Future::Compute, style = Spinner::Style::UNI_DOTS, async = false, message = "") #

ditto


[View source]