mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 04:53:08 +00:00
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.
This commit is contained in:
@@ -227,6 +227,9 @@ do_check()
|
||||
fi
|
||||
}
|
||||
|
||||
# If sourced, provide functions without executing main logic
|
||||
(return 0 2> /dev/null) && return
|
||||
|
||||
#######################################
|
||||
# Main routine: Parse subcommand and arguments, normalize PATH,
|
||||
# and dispatch to the appropriate functionality.
|
||||
|
||||
Reference in New Issue
Block a user