asdf/lib/asdf.fish
Max Nordlund 847ec73751
fix: Use more idiomatic fish (#1042)
The use of `.` is deprecated in fish, unlike POSIX shells. We can avoid
calling `psub` and pipe directly into source which does the same thing.

https://fishshell.com/docs/current/cmds/source.html
2021-10-07 09:20:41 -04:00

16 lines
423 B
Fish

# Add function wrapper so we can export variables
function asdf
set command $argv[1]
set -e argv[1]
switch "$command"
case "shell"
# source commands that need to export variables
command asdf export-shell-version fish $argv | source # asdf_allow: source
case '*'
# forward other commands to asdf script
command asdf "$command" $argv
end
end