mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-28 14:06:12 +02:00
fix(emacs): create a frame for empty launcher invocations (#14091)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
co-authored by
Carlo Sala
parent
a3c88eba72
commit
0431f1c33d
@@ -32,8 +32,9 @@ emacsfun() {
|
||||
# Check if there are suitable frames
|
||||
frames="$(emacsclient -a '' -n -e "$cmd" 2>/dev/null |sed 's/.*\x07//g' )"
|
||||
|
||||
# Only create another X frame if there isn't one present
|
||||
if [ -z "$frames" -o "$frames" = nil ]; then
|
||||
# A bare emacs/e passes only --no-wait, so it still needs --create-frame.
|
||||
if [ -z "$frames" ] || [ "$frames" = nil ] || [ "$#" -eq 0 ] \
|
||||
|| { [ "$#" -eq 1 ] && [ "$1" = --no-wait ]; }; then
|
||||
emacsclient --alternate-editor="" --create-frame "$@"
|
||||
return $?
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user