fix(zsh): better handle setting $EDITOR
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 1m3s
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 1m3s
This commit is contained in:
parent
e5ec85048b
commit
df340afa88
@ -123,9 +123,11 @@ fi
|
||||
new_manpager=less
|
||||
fi
|
||||
|
||||
export EDITOR="${EDITOR:-$new_editor}"
|
||||
export VISUAL="${VISUAL:-$new_visual}"
|
||||
export MANPAGER="${MANPAGER:-$new_manpager}"
|
||||
if [[ -n "${new_editor}" ]]; then
|
||||
export EDITOR="${new_editor}"
|
||||
export VISUAL="${new_visual}"
|
||||
export MANPAGER="${new_manpager}"
|
||||
fi
|
||||
}
|
||||
|
||||
### Rust ###
|
||||
|
@ -185,15 +185,11 @@ preexec() {
|
||||
|
||||
# Editor with single letter
|
||||
e() {
|
||||
if [[ "${EDITOR}" =~ "neovide*" ]]; then
|
||||
neovide "${@}"
|
||||
else
|
||||
eval "${EDITOR} ${@}"
|
||||
fi
|
||||
eval "${EDITOR} ${@}"
|
||||
}
|
||||
|
||||
# Open file with default program and detach
|
||||
o() {
|
||||
local in="${@}"
|
||||
xdg-open "${@}" & disown
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user