I have a function `pregion` that is called from another function `plist`.
If `plist` sets the variable `fdir` using `local fdir=${dpath:-$PWD}`
but in `pregion` the variable `fdir` is used without being defined as
local, it then considers `fdir` to be assigned to the value set by the
parent function.
Everything gets very complicated. I want to ask how to properly handle
things so that they do not come to bite you later on.
Furthermore, is it still acceptable to use `${parameter:-word}` and
`${parameter:=word}` these days ? Rather than simply using
`[[ $fdir ]] || fdir=this` or `[[ -v fdir ]] || fdir=that`.