2024-10-31

This commit is contained in:
Gennadiy 2024-10-31 21:39:03 +03:00
parent 4c0e47830c
commit 928f0beebe
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ function directory_tree {
fi
}
# line of exclusions for "ls" from ".gitignore" list — the untracked files
exclusions="-I \".git\" $(sed 's/^/ -I "/;s/$/"/' .gitignore | tr -d '\n')"
exclusions="-I'.git' $(sed -E "s|^(.*)$|-I'\1'|" .gitignore | tr '\n' ' ')"
# put the tree in a container, add a title and output to a file
{
echo "## Directory tree"

View file

@ -62,7 +62,7 @@ function directory_tree {
fi
}
# строка исключений для "ls" из списка ".gitignore" — неотслеживаемые файлы
exclusions="-I \".git\" $(sed 's/^/ -I "/;s/$/"/' .gitignore | tr -d '\n')"
exclusions="-I'.git' $(sed -E "s|^(.*)$|-I'\1'|" .gitignore | tr '\n' ' ')"
# помещаем дерево в контейнер, добавляем заголовок и выводим в файл
{
echo "## Дерево каталогов"