mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
5ab01f49df
It's needed for `asdf shell` command.
21 lines
408 B
Bash
21 lines
408 B
Bash
# The asdf function is a wrapper so we can export variables
|
|
asdf() {
|
|
local command
|
|
command="$1"
|
|
if [ "$#" -gt 0 ]; then
|
|
shift
|
|
fi
|
|
|
|
case "$command" in
|
|
"shell")
|
|
# commands that need to export variables
|
|
eval "$(asdf export-shell-version sh "$@")" # asdf_allow: eval
|
|
;;
|
|
*)
|
|
# forward other commands to asdf script
|
|
command asdf "$command" "$@"
|
|
;;
|
|
|
|
esac
|
|
}
|