Change template for temp file creation

This makes the script compatible with other 'versions' of `mktemp`.
This commit is contained in:
Julio Borja Barra
2018-03-07 12:54:01 +01:00
committed by GitHub
parent c46b72d8d6
commit 137b700097

View File

@@ -29,7 +29,7 @@ function alias_completion {
(( ${#completions[@]} == 0 )) && return 0
# create temporary file for wrapper functions and completions
local tmp_file; tmp_file="$(mktemp -t "${namespace}-${RANDOM}XXX.tmp")" || return 1
local tmp_file; tmp_file="$(mktemp -t "${namespace}-${RANDOM}XXXXXX")" || return 1
local completion_loader; completion_loader="$(complete -p -D 2>/dev/null | sed -Ene 's/.* -F ([^ ]*).*/\1/p')"