Compatibilité elvish 0.18 + hack starship en attendant que cela soit corrigé
This commit is contained in:
parent
d178c54603
commit
f68d1a89ce
|
@ -4,10 +4,10 @@ fn -check {|f|
|
||||||
use str
|
use str
|
||||||
var @missings = (try {
|
var @missings = (try {
|
||||||
sudo ldd $f 2>/dev/null | grep 'not found' | eawk {|_ m @_| put $m }
|
sudo ldd $f 2>/dev/null | grep 'not found' | eawk {|_ m @_| put $m }
|
||||||
} except e {
|
} catch e {
|
||||||
})
|
})
|
||||||
if (> (count $missings) 1) {
|
if (> (count $missings) 1) {
|
||||||
var p = (LC_ALL=C pacman -Qo $f)
|
var p = (tmp E:LC_ALL = C; pacman -Qo $f)
|
||||||
printf "%s seem broken: missing %s\n" $p (str:join ', ' $missings)
|
printf "%s seem broken: missing %s\n" $p (str:join ', ' $missings)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,7 +403,7 @@ edit:add-var pdf~ {|action @args|
|
||||||
must-valid $t {|e| and (> (count $e) 0) (has-key $extr $e[0])}
|
must-valid $t {|e| and (> (count $e) 0) (has-key $extr $e[0])}
|
||||||
$extr[$t[0]] $in $out
|
$extr[$t[0]] $in $out
|
||||||
}
|
}
|
||||||
} except e {
|
} catch e {
|
||||||
rm -rf $out
|
rm -rf $out
|
||||||
fail $e
|
fail $e
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ edit:add-var maj-symfony~ {|@argv|
|
||||||
fn lastVersion {||
|
fn lastVersion {||
|
||||||
try {
|
try {
|
||||||
curl -s (printf 'https://api.github.com/repos/%s/releases/latest' $repo) | grep 'tag_name' | awk '{print substr($2, 3, length($2)-4) }'
|
curl -s (printf 'https://api.github.com/repos/%s/releases/latest' $repo) | grep 'tag_name' | awk '{print substr($2, 3, length($2)-4) }'
|
||||||
} except e {
|
} catch e {
|
||||||
fail 'Impossible de récupérer les infos sur la dernière version'
|
fail 'Impossible de récupérer les infos sur la dernière version'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ edit:add-var maj-symfony~ {|@argv|
|
||||||
#wget -O symfony.tar.gz (printf 'https://github.com/%s/archive/refs/tags/v%s.tar.gz' $repo $version)
|
#wget -O symfony.tar.gz (printf 'https://github.com/%s/archive/refs/tags/v%s.tar.gz' $repo $version)
|
||||||
wget -O symfony.tar.gz (printf 'https://github.com/%s/releases/download/v%s/symfony-cli_linux_amd64.tar.gz' $repo $version)
|
wget -O symfony.tar.gz (printf 'https://github.com/%s/releases/download/v%s/symfony-cli_linux_amd64.tar.gz' $repo $version)
|
||||||
tar -xzf symfony.tar.gz
|
tar -xzf symfony.tar.gz
|
||||||
} except e {
|
} catch e {
|
||||||
cd $cdir
|
cd $cdir
|
||||||
rm -rf $tmp
|
rm -rf $tmp
|
||||||
fail (printf 'Impossible de récupérer symfony %s' $version)
|
fail (printf 'Impossible de récupérer symfony %s' $version)
|
||||||
|
|
7
rc.elv
7
rc.elv
|
@ -23,8 +23,11 @@ set edit:insert:binding[Ctrl-H] = $edit:histlist:start~
|
||||||
#set edit:rprompt = { nop }
|
#set edit:rprompt = { nop }
|
||||||
|
|
||||||
# Starship prompt : https://starship.rs/
|
# Starship prompt : https://starship.rs/
|
||||||
eval (starship init elvish)
|
#eval (starship init elvish)
|
||||||
#eval (starship init elvish --print-full-init | upgrade-scripts-for-0.17 -lambda | slurp)
|
{
|
||||||
|
use re
|
||||||
|
eval (re:replace 'except' 'catch' (starship init elvish --print-full-init | slurp))
|
||||||
|
}
|
||||||
|
|
||||||
# Carapace completion : https://github.com/rsteube/carapace-bin
|
# Carapace completion : https://github.com/rsteube/carapace-bin
|
||||||
eval (carapace _carapace|slurp)
|
eval (carapace _carapace|slurp)
|
||||||
|
|
Loading…
Reference in New Issue