mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-06 21:50:14 +00:00
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.
18 lines
394 B
Bash
Executable File
18 lines
394 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Thin wrapper — delegates to x-path remove.
|
|
# Can be sourced (PATH changes propagate) or executed.
|
|
#
|
|
# Usage: x-path-remove <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_remove "$@"
|