Allow VISUAL or EDITOR env to pass to jlmkr calls

This allows the following action: "EDITOR=cat jlmkr edit runitpi"
This commit is contained in:
Lockszmith (@kateryna) 2024-11-24 22:11:39 -05:00
parent ec1123ecb9
commit 2a630983a6
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ if is_cmd midclt; then
if [ -n "$SCALE_POOL_ROOT" ]; then
if [ -e "$SCALE_POOL_ROOT/jailmaker/jlmkr.py" ]; then
#alias jlmkr="bash -c '_jlmkr() { $SCALE_POOL_ROOT/jailmaker/jlmkr.py \${@:---help}; }; _jlmkr \$@' "
function jlmkr() { sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py "${@:---help}"; }
function jlmkr() { sudo VISUAL="${VISUAL:-}" EDITOR="${EDITOR:-}" $SCALE_POOL_ROOT/jailmaker/jlmkr.py "${@:---help}"; }
jlmkr-zellij() {
zellij action go-to-tab-name --create "jailmkr"