Shell Library Design
Function Prefix
Name Helpers
A small prefix keeps library helper names grouped and reduces accidental collisions with script-level functions.
Program
Play the script to choose the prefix and see the generated helper-style name.
library_function_prefix.sh
#!/usr/bin/env bash
lib_prefix=
helper="start"
function_name="${lib_prefix}_${helper}"
echo "$function_name"
#!/usr/bin/env bash
lib_prefix=
helper="start"
function_name="${lib_prefix}_${helper}"
echo "$function_name"
name prefix
A prefix groups related helper names together.
collision avoidance
Distinct helper names reduce clashes with caller scripts.
library convention
A naming convention is part of the library's public contract.