diff options
author | justanothercatgirl <sotov2070@gmail.com> | 2024-02-28 08:05:18 +0300 |
---|---|---|
committer | justanothercatgirl <sotov2070@gmail.com> | 2024-02-28 08:05:18 +0300 |
commit | 565b890fad5404ef7146334cc5f5c9cea5cbfb8e (patch) | |
tree | 6790160a5f4113a6ee87e4b574b9ee802124fc4e /.cursed_bash.sh | |
parent | 00a7bf1bd132abe1491b96e8f0c37ae1b8ec7138 (diff) |
PS1 changed
Diffstat (limited to '.cursed_bash.sh')
-rw-r--r-- | .cursed_bash.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.cursed_bash.sh b/.cursed_bash.sh index f304e14..9ceaee6 100644 --- a/.cursed_bash.sh +++ b/.cursed_bash.sh @@ -1,4 +1,9 @@ +function cut_dots { + read arg + echo $arg | awk "{ if (length > $1) print substr(\$0,1,$(($1 - 2)))\"..$2\"; else if (length > 1) print \$0\"$2\"; else print; }" +} + function count_git_files_length { echo $( for i in `git ls-tree --full-tree -r --name-only HEAD`; do wc -l "$i"; done | sed -r 's/[^0-9]+/\+/g' | cat - <(echo 0) | tr -d '\n'; echo ) | bc } |