A small Bash toolbox for everyday shell tasks.
The repository is organized in two parts:
- Bash function files, loaded automatically in your shell.
- Standalone scripts in
Scripts/, exposed as normal commands throughPATH.
Clone the repository into your home directory:
git clone <your-repo-url> ~/.bash_functionsAdd this block to ~/.bashrc:
# Import ~/.bash_functions recursively
functions_directory="$HOME/.bash_functions"
_import_recursively() {
local path="$1"
local ignore_files=(
"README.md"
"LICENSE"
"Scripts"
)
local name
name="$(basename "$path")"
local ignored
for ignored in "${ignore_files[@]}"; do
[[ "$name" == "$ignored" ]] && return 0
done
if [[ -d "$path" ]]; then
local item
for item in "$path"/*; do
[[ -e "$item" ]] || continue
_import_recursively "$item"
done
elif [[ -f "$path" ]]; then
# shellcheck source=/dev/null
source "$path"
fi
}
if [[ -d "$functions_directory" ]]; then
_import_recursively "$functions_directory"
PATH="$PATH:$functions_directory/Scripts"
fiReload your shell:
source ~/.bashrcWrapper around flatpak list --app with custom columns and sorting.
Examples:
flatpak-list
flatpak-list --sort=size
flatpak-list --columns=name,application,version,size
flatpak-list --helpConverts text to lowercase and replaces spaces with dashes.
Example:
lower_and_dash "My New Note"
# my-new-noteWatches files in the current directory and prints changed paths.
Example:
monitor-changes
monitor-changes 1Defaults to 2 seconds. Common heavy directories are excluded (.git, node_modules, dist, build, .next, .cache).
Prints a numbered rename preview for files in chronological order.
Example:
preview-numbered-renames.sh ./photos- Function files are sourced in your current shell process.
- Files inside
Scripts/are not sourced; they are executed as commands. - Keep executable scripts with
chmod +x.