This is a shell script that provides a structured overview of your directory, excluding directories listed in .gitignore
and any file or directory starting with a dot. The structure is printed up to three levels deep (-L 3
).
This script uses the tree
and rg
(ripgrep) commands. If these are not installed on your system, you can install them with the following commands:
sudo apt-get install tree ripgrep
brew install tree ripgrep
To use this script, you need to make it executable. You can do this by running the following command in your terminal:
chmod +x show_structure.sh
Then, you can run the script with:
./show_structure.sh
The script will print a tree-like structure of your directory up to three levels deep, excluding directories listed in your .gitignore
and any file or directory starting with a dot.
Please adapt the installation commands if you are using a different package manager or operating system.