mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-19 16:12:45 +08:00
14 lines
253 B
Fish
14 lines
253 B
Fish
function omf.packages.run_hook -a path hook
|
|
set -l hook_script "$path/hooks/$hook.fish"
|
|
set package (basename $path)
|
|
|
|
if test -e "$hook_script"
|
|
pushd $path
|
|
source "$hook_script"
|
|
set -l code $status
|
|
popd
|
|
|
|
return $code
|
|
end
|
|
end
|