fix(Bash): helix alias
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user