envkernel: only export alias when defined (MR 2249)

MR !2229 make pmbootstrap optional and break fish compat
This commit is contained in:
xtex 2024-02-07 12:16:42 +08:00 committed by Oliver Smith
parent 0c8b9c805f
commit 3609a68aaf
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -439,7 +439,7 @@ main() {
fish_compat() {
[ "$1" = "--fish" ] || return 0
for name in make kernelroot pmbootstrap pmbroot; do
echo "alias $(alias $name | sed 's/=/ /')"
alias "$name" >/dev/null 2>&1 && echo "alias $(alias "$name" | sed 's/=/ /')"
done
}