use herestring rather than echo

I suggest using a herestring `<<<`, it saves a sub-process spawn and should very slightly reduce execution time.
pull/19/head
Frédéric Mahé 2020-04-24 12:39:18 +02:00 committed by GitHub
parent 1c40f2e770
commit 1f09b13df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2477,7 +2477,7 @@ pause_() { #? Pause input and draw a darkened version of main ui
unset pause_screen unset pause_screen
print -v pause_screen -rs -b -fg ${theme[inactive_fg]} print -v pause_screen -rs -b -fg ${theme[inactive_fg]}
pause_screen+="${theme[main_bg]}m$(echo -n "${prev_screen}" | sed -E 's/\\e\[[0-9;\-]*m//g')\e[0m" #\e[1;38;5;236 pause_screen+="${theme[main_bg]}m$(sed -E 's/\\e\[[0-9;\-]*m//g' <<< "${prev_screen}")\e[0m" #\e[1;38;5;236
if [[ -z $ext_var ]]; then echo -en "${pause_screen}" if [[ -z $ext_var ]]; then echo -en "${pause_screen}"
else pause_out="${pause_screen}"; fi else pause_out="${pause_screen}"; fi