fix(Bash): helix alias
This commit is contained in:
@@ -1,10 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
pj_helix() {
|
pj_helix() {
|
||||||
if command -v helix >/dev/null 2>&1; then
|
local helix_bin
|
||||||
command helix -c "$BASH_POLYJUICE_HELIX_CONFIG_FILE" "$@"
|
local hx_bin
|
||||||
elif command -v hx >/dev/null 2>&1; then
|
|
||||||
command hx -c "$BASH_POLYJUICE_HELIX_CONFIG_FILE" "$@"
|
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
|
else
|
||||||
echo "HELIX/HX is not installed"
|
echo "HELIX/HX is not installed"
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user