Bash 4.3+ supports namerefs via `local -n`, which lets functions mutate variables passed by name — similar to pointer behavior in other languages. This avoids globals and subshell workarounds (like `VAR=$(func)`), and is especially useful for returning or modifying arrays. A real-world example from a dotfiles install script
Sort: