From: Oleg Broytman Date: Mon, 26 Apr 2021 15:17:12 +0000 (+0300) Subject: Feat(bash_prompt): Cut dirs to 20% of the term width X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e507d6e0c73bef06385da3bc457c72a86e2e8100;p=dotfiles.git Feat(bash_prompt): Cut dirs to 20% of the term width --- diff --git a/admin/prog/bash_prompt b/admin/prog/bash_prompt index 7ef5fc9..8c3a9fe 100644 --- a/admin/prog/bash_prompt +++ b/admin/prog/bash_prompt @@ -6,6 +6,10 @@ cgmem_which_prompt() { fi } +# Cut directories to 20% of the terminal width; add space for 3 dots +_DIR_LENGTH=`awk "END { print int(0.2 * $COLUMNS) }"