Refactor "{type => _omb_util_command_exists}"

This commit is contained in:
Koichi Murase
2022-08-23 17:42:39 +09:00
parent de66a70f91
commit 2202aeeb04
5 changed files with 5 additions and 5 deletions

View File

@@ -403,7 +403,7 @@ _omb_util_alias() {
function _omb_util_mktemp {
local template=tmp.oh-my-bash.XXXXXXXXXX
if type -t mktemp &>/dev/null; then
if _omb_util_command_exists mktemp; then
mktemp -t "$template"
else
m4 -D template="${TMPDIR:-/tmp}/$template" <<< 'mkstemp(template)'