expand tilde correctly in bashcompletion (fixes #41302)

This commit is contained in:
Benedikt Heine 2017-05-18 18:48:12 +02:00
parent d66ffa2474
commit df290b7b09

View File

@ -35,8 +35,8 @@ _salt_get_keys(){
}
_salt(){
local _salt_cache_functions=${SALT_COMP_CACHE_FUNCTIONS:='~/.cache/salt-comp-cache_functions'}
local _salt_cache_timeout=${SALT_COMP_CACHE_TIMEOUT:='last hour'}
local _salt_cache_functions=${SALT_COMP_CACHE_FUNCTIONS:-"$HOME/.cache/salt-comp-cache_functions"}
local _salt_cache_timeout=${SALT_COMP_CACHE_TIMEOUT:-"last hour"}
if [ ! -d "$(dirname ${_salt_cache_functions})" ]; then
mkdir -p "$(dirname ${_salt_cache_functions})"