Updating cursor.sh with additional functions.
This commit is contained in:
parent
518fbfb68f
commit
254138f98d
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
Cursor_position ()
|
Cursor_goto_position ()
|
||||||
{
|
{
|
||||||
__LINE="${1}"
|
__LINE="${1}"
|
||||||
__COLUMN="${2}"
|
__COLUMN="${2}"
|
||||||
|
@ -18,6 +18,18 @@ Cursor_position ()
|
||||||
printf "[${__LINE};${__COLUMN};H"
|
printf "[${__LINE};${__COLUMN};H"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cursor_save_position ()
|
||||||
|
{
|
||||||
|
#echo -e "[s\c"
|
||||||
|
printf "[s"
|
||||||
|
}
|
||||||
|
|
||||||
|
Cursor_restore_position ()
|
||||||
|
{
|
||||||
|
#echo -e "[u\c"
|
||||||
|
printf "[u"
|
||||||
|
}
|
||||||
|
|
||||||
Cursor_line_up ()
|
Cursor_line_up ()
|
||||||
{
|
{
|
||||||
__LINES="${1}"
|
__LINES="${1}"
|
||||||
|
@ -49,3 +61,15 @@ Cursor_columns_backward ()
|
||||||
#echo -e "[${__COLUMNS}D\c"
|
#echo -e "[${__COLUMNS}D\c"
|
||||||
printf "[${__COLUMNS}D"
|
printf "[${__COLUMNS}D"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cursor_clear_screen ()
|
||||||
|
{
|
||||||
|
#echo -e "[2J\c"
|
||||||
|
printf "[2J"
|
||||||
|
}
|
||||||
|
|
||||||
|
Cursor_erase_EOL ()
|
||||||
|
{
|
||||||
|
#echo -e "[K\c"
|
||||||
|
printf "[K"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue