wip(commands): re-implement core commands as bash functions

Re-implement all libexec executables as bash functions, with the goal of
being able build a single standalone execuable bash script for
tmuxifier.
This commit is contained in:
2025-12-01 23:17:41 +00:00
parent f268c12f3f
commit b2a67705b6
8 changed files with 240 additions and 174 deletions

17
lib/load.sh Normal file
View File

@@ -0,0 +1,17 @@
# Setup layout path.
if [ -z "${TMUXIFIER_LAYOUT_PATH}" ]; then
export TMUXIFIER_LAYOUT_PATH="${TMUXIFIER}/layouts"
else
export TMUXIFIER_LAYOUT_PATH="${TMUXIFIER_LAYOUT_PATH%/}"
fi
# Add tmuxifier's internal commands to PATH.
export PATH="$TMUXIFIER/libexec:$PATH"
# Load utility functions.
source "$TMUXIFIER/lib/util.sh"
# Load command functions from lib/commands/ directory directly.
source "$TMUXIFIER/lib/commands/alias.sh"
source "$TMUXIFIER/lib/commands/resolve-command-path.sh"
source "$TMUXIFIER/lib/commands/tmux-version.sh"