qemush : n'initialiser EDITOR qu'à l'endroit où on en a besoin

This commit is contained in:
Ahurac 2024-03-24 22:51:42 +01:00
parent 11fa69c866
commit d1d579fcd2

View file

@ -6,10 +6,6 @@
# Environment
PATH="${HOME}/launchers:${HOME}/bin:${PATH}"
# I don't even know why shellcheck gives me this warning
# shellcheck disable=2209
[ -z "$EDITOR" ] && EDITOR=vi
export QEMUSH_NAME
# Aliases
ls='ls --color=auto'
@ -119,6 +115,9 @@ public_diskls() {
public_edit() {
cd || return
local file="launchers/${1}"
# I don't even know why shellcheck gives me this warning
# shellcheck disable=2209
[ -z "$EDITOR" ] && EDITOR=vi
"$EDITOR" "$file"
[ -f "$file" ] && exec chmod u+x "$file"