setCursorLine

import { setCursorLine } from "jsr:@ende/cli/unstable-ansi";

function ยท experimental

function setCursorLine(x: number = 1): string

Sets cursor position to line x or down to the bottom of the margin. Lines begin at 1 not 0.

x: number = 1

The line to move to.

Returns

The ANSI escape code for setting the cursor line.

Example: Usage

import * as Ansi from "@ende/cli/unstable-ansi";

console.log(Ansi.setCursorLine() + Ansi.ERASE_LINE + "Hello World!");

Source