2026-09-30 11:54:14 -04:00
|
|
|
function _gho_bind --description 'ctrl-o: gho (tv --inline), then redraw the prompt in the right place'
|
|
|
|
|
set -l before $PWD
|
2026-10-05 09:15:20 -04:00
|
|
|
_iris_busy start
|
2026-09-30 11:54:14 -04:00
|
|
|
gho
|
2026-10-05 09:15:20 -04:00
|
|
|
_iris_busy stop
|
2026-09-30 11:54:14 -04:00
|
|
|
if test "$PWD" = "$before"
|
|
|
|
|
# Cancelled (or the nvim action ran): tv --inline left the cursor on
|
|
|
|
|
# the line below the prompt; step back so repaint redraws in place.
|
|
|
|
|
printf '\033[A' >/dev/tty
|
|
|
|
|
else
|
|
|
|
|
# cd + clear + onefetch: put the prompt below onefetch's output.
|
|
|
|
|
printf '\n' >/dev/tty
|
|
|
|
|
end
|
|
|
|
|
commandline -f repaint
|
|
|
|
|
end
|