Change template for temp file creation

This makes the script compatible with other 'versions' of `mktemp`.
pull/1159/head
Julio Borja Barra 2018-03-07 12:54:01 +01:00 committed by GitHub
parent c46b72d8d6
commit 137b700097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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