mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
16 lines
545 B
Fish
16 lines
545 B
Fish
function _gho_bind --description 'ctrl-o: gho (tv --inline), then redraw the prompt in the right place'
|
|
set -l before $PWD
|
|
_iris_busy start
|
|
gho
|
|
_iris_busy stop
|
|
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
|