I'm very confused by this result.
I have two questions.
What's wrong with that?
What are
*,@, andargv?
$ set GITHUB_ENV_var=1
$ echo $GITHUB_ENV_var
# ❌ after set, echo nothing
$ set | grep GITHUB_ENV_var
'*'=( 'GITHUB_ENV_var=1' )
@=( 'GITHUB_ENV_var=1' )
argv=( 'GITHUB_ENV_var=1' )
$ unset GITHUB_ENV_var
# ❌ unset no work at all
$ set | grep GITHUB_ENV_var
'*'=( 'GITHUB_ENV_var=1' )
@=( 'GITHUB_ENV_var=1' )
argv=( 'GITHUB_ENV_var=1' )
I'm using the zsh as the default shell.
expect result
$ set GITHUB_ENV_var=1
$ echo $GITHUB_ENV_var
1
update
I know that I can use export GITHUB_ENV_var=1 to set a system-wide variable value, but I wonder why the set and unset commands did not work as expected.


I'm really sorry for asking this question without fully understanding the "set" command.
I understand three things after reading the book
Linux Command Line and Shell Scripting Bible, 3Esetcommand is not designed for setting environment variables;exportcommand is used to set system-wide environment variables;unsetcommand can delete environment variables, I mistakenly thought that thesetcommand and theunsetcommand were the opposite functions;