Improve UI for move/copy in lf (#1438)

* Clear screen before move/copy

Quick fix for https://github.com/LukeSmithxyz/voidrice/pull/1437#issuecomment-2430008043

* More UI improvements
This commit is contained in:
Rokosun 2025-02-28 19:10:40 +00:00 committed by GitHub
parent e7c02d9726
commit 4606e9156a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,8 @@ cmd delete ${{
cmd moveto ${{
set -f
dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --prompt 'Move to where? ' | sed 's|~|$HOME|')
clear; tput cup $(($(tput lines)/3))
dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Move to where? ' | sed 's|~|$HOME|')
[ -z "$dest" ] && exit
destpath=$(eval printf '%s' \"$dest\")
clear; tput cup $(($(tput lines)/3)); tput bold
@ -110,7 +111,8 @@ cmd moveto ${{
cmd copyto ${{
set -f
dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --prompt 'Copy to where? ' | sed 's|~|$HOME|')
clear; tput cup $(($(tput lines)/3))
dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Copy to where? ' | sed 's|~|$HOME|')
[ -z "$dest" ] && exit
destpath=$(eval printf '%s' \"$dest\")
clear; tput cup $(($(tput lines)/3)); tput bold