(testsuite) Fix _known_hosts_real
Clear COMPREPLY after test now that _known_hosts_real is appending instead of setting COMPREPLY.
This commit is contained in:
parent
60ee2500bc
commit
820b7c2602
@ -16,10 +16,13 @@ diff_env() {
|
|||||||
|
|
||||||
|
|
||||||
# Output array elements, sorted and separated by newline
|
# Output array elements, sorted and separated by newline
|
||||||
|
# Unset variable after outputting.
|
||||||
# @param $1 Name of array variable to process
|
# @param $1 Name of array variable to process
|
||||||
|
# @param $2 -u (optional) Unset variable after echo
|
||||||
echo_array() {
|
echo_array() {
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
eval echo \"\${$1[*]}\" | sort
|
eval printf "%s" \"\${$1[*]}\" | sort
|
||||||
|
unset -v $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user