Change cursor movement functions to string repeat

This commit is contained in:
Ilan Cosman 2020-06-29 10:41:51 -07:00
parent 2d388e3745
commit 563e28ef57
2 changed files with 3 additions and 7 deletions

View File

@ -11,7 +11,7 @@ Tide is a [Fish][] theme that provides a powerful, flexible, and out-of-the-box
2. Source and run the install function: 2. Source and run the install function:
```fish ```fish
curl -sL git.io/tide | source; and tide_install curl -sL git.io/tide | source && tide_install
``` ```
### System Requirements ### System Requirements

View File

@ -1,11 +1,7 @@
function _cursor_up -a number function _cursor_up -a number
if test $number -gt 0 string repeat --count $number --no-newline \e\[1A
printf '%b' '\033['"$number"'A'
end
end end
function _cursor_right -a number function _cursor_right -a number
if test $number -gt 0 string repeat --count $number --no-newline \e\[1C
printf '%b' '\033['"$number"'C'
end
end end