This script is designed to streamline various tasks related to managing and formatting code files, particularly within a Git environment. It encompasses features for setting executable permissions on scripts, installing the black Python code formatter, and applying code formatting and style checks to Python and C files using black
, pycodestyle
, and betty
, respectively.
- Please Chack aliases in
bash_file
to avoid duplicating an alias if you already use some. - If you installed SetGet before
DO NOT INSTALL IT
, open your~/.bashrc
file and copmare aliases and function and copy what you need.
Added:
Auto-completion for bash.Added:
Scriptx
.Added:
New aliasesUpdated:
Additional features todir_navigator.sh
.Removed:
Old, unnecessary functions.
- Clone the repository anywhere and navigate to the repo.
- Review the aliases in
bash_file
and update alias names if necessary before installing. - Run
./install.sh
- Ensure you don't have an alias or function named
x
; change it if found. - Run
source ~/.bashrc
- Copy
x
script into your bin
- re - use this function to fast travel between directories
Updated:
Now accepts arguments.Updated:
Cleans up dir_history.Updated:
You can delete directories directly from the re function.
This Bash script is designed to automate various tasks related to managing and formatting code files. It includes functions for setting executable permissions on scripts, installing the black Python code formatter, and applying code formatting and style checks to Python and C files using black, pycodestyle, and betty respectively.
Features
Scripted Permissions Management:
The script includes a function (chmod_scripts
) to automatically set executable permissions on scripts based on their shebang lines.
Python Code Formatting:
The script provides functionality (process_python_files
) to apply the black
Python code formatter to Python files, ensuring consistent and formatted code. It also checks Python code style using pycodestyle
.
black Installation:
To enhance code formatting capabilities, the script includes a function (install_black
) that installs the black
code formatter if it is not already installed.
C Code Style Checking:
The script includes a function (check_and_run_betty_c
) to check C files using the betty
coding style checker, ensuring adherence to coding standards.