From 2ff607822aebd4860d7e546698a9ee60860123a6 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sun, 26 Sep 2021 18:48:44 +0900 Subject: [PATCH] edit (command-help): use "ble/util/assign/.mktmp" to determine the temporary filename --- src/edit.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/edit.sh b/src/edit.sh index 4005be72..fd559fad 100644 --- a/src/edit.sh +++ b/src/edit.sh @@ -6876,9 +6876,10 @@ function read { ble/builtin/read "$@"; } ## 関数 ble/widget/command-help/.read-man ## @var[out] man_content function ble/widget/command-help/.read-man { - local pager="sh -c 'cat >| \"\$BLETMPFILE\"'" tmp=$_ble_util_assign_base - BLETMPFILE=$tmp MANPAGER=$pager PAGER=$pager MANOPT= man "$@" 2>/dev/null; local ext=$? # 668ms - ble/util/readfile man_content "$tmp" # 80ms + local -x _ble_local_tmpfile; ble/util/assign/.mktmp + local pager="sh -c 'cat >| \"\$_ble_local_tmpfile\"'" + MANPAGER=$pager PAGER=$pager MANOPT= man "$@" 2>/dev/null; local ext=$? # 668ms + ble/util/readfile man_content "$_ble_local_tmpfile" # 80ms return "$ext" }