Update.
authorFrancois Fleuret <francois@fleuret.org>
Mon, 2 Apr 2018 08:00:20 +0000 (10:00 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Mon, 2 Apr 2018 08:00:20 +0000 (10:00 +0200)
bashrc

diff --git a/bashrc b/bashrc
index b2b3e51..9ee087b 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -586,8 +586,9 @@ function checkgw () {
 
 function lr () {
     TERM_SIZE=($(stty size))
+    INVIS="${VT_GREEN_FG}${VT_RESET}"
     \ls -goth --time-style="+${VT_GREEN_FG}%Y %b %d %H:%M${VT_RESET}" "$@" | \
-        head -$((TERM_SIZE[0]-2)) | cut -b1-${TERM_SIZE[1]}
+        head -$((TERM_SIZE[0]-2)) | cut -b1-$((TERM_SIZE[1]+${#INVIS}))
 }
 
 ######################################################################