From 682b7a1d6dc1a35f7f8b0ddbab977e0a3dae2c9c Mon Sep 17 00:00:00 2001 From: cherryblossom000 <31467609+cherryblossom000@users.noreply.github.com> Date: Tue, 1 Mar 2022 00:58:18 +1100 Subject: [PATCH] fix(elvish): prepend asdf paths to `$PATH` (#1174) * fix(elvish): prepend asdf paths to `$PATH` * refactor(elvish): minor improvements --- asdf.elv | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/asdf.elv b/asdf.elv index a9376efa..abfad0e5 100644 --- a/asdf.elv +++ b/asdf.elv @@ -1,9 +1,8 @@ - +use path use re use str -use path -var asdf_dir = $E:HOME'/.asdf' +var asdf_dir = ~'/.asdf' if (and (has-env ASDF_DIR) (!=s $E:ASDF_DIR '')) { set asdf_dir = $E:ASDF_DIR } else { @@ -32,7 +31,7 @@ fn asdf {|command @args| } fn match {|argz @pats| - var matched = $true; + var matched = $true if (!= (count $argz) (count $pats)) { set matched = $false } else { @@ -88,8 +87,8 @@ for path [ ] { if (not (has-value $paths $path)) { set paths = [ - $@paths $path + $@paths ] } }