mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix(elvish): prepend asdf paths to $PATH
(#1174)
* fix(elvish): prepend asdf paths to `$PATH` * refactor(elvish): minor improvements
This commit is contained in:
parent
e0d27e6c3c
commit
682b7a1d6d
9
asdf.elv
9
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
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user