On Mon, Feb 21, 2022 at 2:23 AM konsolebox wrote:
>
> Commonly `readarray -t`, a pipe, and a subshell is used to get the
> results of compgen but this has two problems:
>
> - It uses a pipe and a subshell
> - Values having newlines will be split
>
> Those can be prevented if another option is adde
Commonly `readarray -t`, a pipe, and a subshell is used to get the
results of compgen but this has two problems:
- It uses a pipe and a subshell
- Values having newlines will be split
Those can be prevented if another option is added. E.g.:
compgen -O array_var ...
--
konsolebox