From f5ed9acc951aa475bc4a8a121721194c8815de25 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 3 Aug 2020 22:37:14 +0300 Subject: [PATCH] history --- shfm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shfm b/shfm index 179fb0a..4a09382 100755 --- a/shfm +++ b/shfm @@ -27,8 +27,16 @@ list_print() { printf '\033[2J\033[H' i=1 + j=1 end=$((bottom + 1)) + for file do + [ "${PWD%%/}/$file" = "$OLDPWD" ] && + y=$j y2=$((j > bottom ? bottom : j)) + + j=$((j + 1)) + done + [ "$y" -gt "$bottom" ] && shift "$((y - bottom))"