mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
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
This commit is contained in:
parent
8a515f49d7
commit
847ec73751
@ -7,7 +7,7 @@ function asdf
|
||||
switch "$command"
|
||||
case "shell"
|
||||
# source commands that need to export variables
|
||||
. (asdf export-shell-version fish $argv | psub)
|
||||
command asdf export-shell-version fish $argv | source # asdf_allow: source
|
||||
case '*'
|
||||
# forward other commands to asdf script
|
||||
command asdf "$command" $argv
|
||||
|
@ -26,6 +26,7 @@ banned_commands=(
|
||||
"sort.*-V"
|
||||
"sort.*--sort-versions"
|
||||
# source isn't POSIX compliant. . behaves the same and is POSIX compliant
|
||||
# Except in fish, where . is deprecated, and will be removed in the future.
|
||||
source
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user