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
|
new_manpager=less
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export EDITOR="${EDITOR:-$new_editor}"
|
if [[ -n "${new_editor}" ]]; then
|
||||||
export VISUAL="${VISUAL:-$new_visual}"
|
export EDITOR="${new_editor}"
|
||||||
export MANPAGER="${MANPAGER:-$new_manpager}"
|
export VISUAL="${new_visual}"
|
||||||
|
export MANPAGER="${new_manpager}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
### Rust ###
|
### Rust ###
|
||||||
|
@ -185,15 +185,11 @@ preexec() {
|
|||||||
|
|
||||||
# Editor with single letter
|
# Editor with single letter
|
||||||
e() {
|
e() {
|
||||||
if [[ "${EDITOR}" =~ "neovide*" ]]; then
|
eval "${EDITOR} ${@}"
|
||||||
neovide "${@}"
|
|
||||||
else
|
|
||||||
eval "${EDITOR} ${@}"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open file with default program and detach
|
# Open file with default program and detach
|
||||||
o() {
|
o() {
|
||||||
local in="${@}"
|
local in="${@}"
|
||||||
xdg-open "${@}" & disown
|
xdg-open "${@}" & disown
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user