fix(Bash): helix alias

This commit is contained in:
2026-05-27 16:21:59 +08:00
parent 8b36c0019f
commit 0d208b29d0
+10 -4
View File
@@ -1,10 +1,16 @@
#!/usr/bin/env bash
pj_helix() {
if command -v helix >/dev/null 2>&1; then
command helix -c "$BASH_POLYJUICE_HELIX_CONFIG_FILE" "$@"
elif command -v hx >/dev/null 2>&1; then
command hx -c "$BASH_POLYJUICE_HELIX_CONFIG_FILE" "$@"
local helix_bin
local hx_bin
helix_bin=$(type -P helix)
hx_bin=$(type -P hx)
if [[ -n "$helix_bin" ]]; then
command "$helix_bin" -c "$BASH_POLYJUICE_HELIX_CONFIG_FILE" "$@"
elif [[ -n "$hx_bin" ]]; then
command "$hx_bin" -c "$BASH_POLYJUICE_HELIX_CONFIG_FILE" "$@"
else
echo "HELIX/HX is not installed"
return 1