From: Oleg Broytman Date: Mon, 8 Jun 2020 17:47:20 +0000 (+0300) Subject: Fix(short_curdir): Count ellipsis X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=6bb05e7c4a2163426852a25089909e49b584ff85;p=dotfiles.git Fix(short_curdir): Count ellipsis --- diff --git a/admin/prog/short_curdir b/admin/prog/short_curdir index 62ede06..315543d 100644 --- a/admin/prog/short_curdir +++ b/admin/prog/short_curdir @@ -9,7 +9,7 @@ short_curdir() { fi local _short_curdir _short_curdir="${PWD##*/}" # cut all directories, get base name - if [ "${#_short_curdir}" -gt 15 ]; then + if [ "${#_short_curdir}" -gt 18 ]; then _short_curdir="${_short_curdir::15}..." # cut long string fi echo "${_short_curdir}"