Re: Set command lists the shell variables and values, then lists other t
From:
Greg Wooledge
Subject:
Re: Set command lists the shell variables and values, then lists other text (Script?)
Date:
Sun, 26 Jan 2025 18:32:22 -0500
User-agent:
Mutt/1.10.1 (2018-07-13)
On Sun, Jan 26, 2025 at 17:40:35 -0500, Pete Edwards wrote:
> The set command executed should list the shell variables and values, which
> it does, but it is followed by other text, which looks like script text
> that has no purpose in the output expectred.
The "set" command shows variables *and* functions.
> __parse_options ()
> {
> local -a _options=();
> _comp_compgen_help__parse "$1";
> printf '%s\n' "${_options[@]}"
> }
That's an example of a function. I'm guessing you didn't write it,
so it probably comes from bash_completion or something.