scy, Nice trick for retrieving the current cursor position in bash:
IFS=';' read -sdR -p $'\E6n' row col && echo "row ${row#*[} column $col"
https://unix.stackexchange.com/a/183121
This is not POSIX-compatible though because of the flags in read.
I've used this to add an empty line in front of all of my shell prompts, except when on the top of the screen (i.e. in a new shell).
https://codeberg.org/scy/dotfiles/commit/f18000298473f78540723224e8f73971e26996ac
Add comment