Files
TerminalPolyjuice/bash/aliases/helix_alias.sh
T
2026-05-27 16:21:59 +08:00

27 lines
440 B
Bash

#!/usr/bin/env bash
pj_helix() {
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
fi
}
helix() {
pj_helix "$@"
}
hx() {
pj_helix "$@"
}