Files
dotfiles/local/bin/x-path-append
Ismo Vuorinen fc8db1f5b5 refactor(path): consolidate x-path-{append,prepend,remove} as thin wrappers
Add source guard to x-path so its functions can be loaded without
executing the main logic. Rewrite standalone path scripts to source
x-path and call the appropriate function directly, eliminating code
duplication while preserving source-ability for shell integration.
2026-02-05 22:07:03 +02:00

18 lines
394 B
Bash
Executable File

#!/usr/bin/env bash
#
# Thin wrapper — delegates to x-path append.
# Can be sourced (PATH changes propagate) or executed.
#
# Usage: x-path-append <directory1> [<directory2> ...]
#
# Author: Ismo Vuorinen <https://github.com/ivuorinen> 2024
# License: MIT
VERBOSE="${VERBOSE:-0}"
# shellcheck source=./x-path
. "$(dirname "${BASH_SOURCE[0]:-$0}")/x-path"
normalize_path_var
do_append "$@"