Condense emacsclient shell script a little
This commit is contained in:
parent
77624f4e38
commit
6b5d3c6cfd
15
config.org
15
config.org
|
@ -1031,21 +1031,16 @@ if [ -z "$DISPLAY" ] || $force_tty; then
|
|||
# detect terminals with sneaky 24-bit support
|
||||
if { [ "$COLORTERM" = truecolor ] || [ "$COLORTERM" = 24bit ]; } && [ $(tput colors 2>/dev/null) -lt 257 ]; then
|
||||
if echo "$TERM" | grep -q "^\w\+-[0-9]"; then
|
||||
termstub="${TERM%%-*}"
|
||||
else
|
||||
termstub="${TERM#*-}"
|
||||
fi
|
||||
termstub="${TERM%%-*}"; else
|
||||
termstub="${TERM#*-}"; fi
|
||||
if infocmp "$termstub-direct" >/dev/null 2>&1; then
|
||||
TERM="$termstub-direct"
|
||||
else
|
||||
TERM="xterm-direct" # should be fairly safe
|
||||
fi
|
||||
TERM="$termstub-direct"; else
|
||||
TERM="xterm-direct"; fi # should be fairly safe
|
||||
fi
|
||||
emacsclient --tty -create-frame --alternate-editor="" "${args[@]}"
|
||||
else
|
||||
if ! $force_wait; then
|
||||
args+=(--no-wait)
|
||||
fi
|
||||
args+=(--no-wait); fi
|
||||
emacsclient -create-frame --alternate-editor="" "${args[@]}"
|
||||
fi
|
||||
#+end_src
|
||||
|
|
Loading…
Reference in New Issue