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