Module doh::ops::term [] [src]

Windows and non-Windows terminal utilities.

All functions in this module return something printable, and you should print their results, but do not assume that it's the returned text that does stuff, i.e. do not mix terminal manipulation and printing into the same call, and always flush after printing and before using the functions.

Examples

print!("{}{}", move_cursor_up(5), move_cursor_back(3));
print!("HLO");
stdout().flush().unwrap();
print!("{}", move_cursor_down(5));

Functions

move_cursor_back

Move the cursor n characters back (left).

move_cursor_down

Move the cursor n lines down.

move_cursor_up

Move the cursor n lines up.

open_file_picker

Show a file picker to let user choose a file.

save_file_picker

Show a file picker to let user choose where to save a file with the specified filename and optional extension.

show_cursor

Show/hide the cursor/caret.