set -o 출력과 set +o 출력의 차이점은 무엇입니까?

set -o 출력과 set +o 출력의 차이점은 무엇입니까?

내가 사용할 때 set -o:

❯ set -o
noaliases             off
aliasfuncdef          off
allexport             off
noalwayslastprompt    off
alwaystoend           on
appendcreate          off
noappendhistory       off
autocd                on
autocontinue          off
noautolist            off
noautomenu            off
autonamedirs          off
noautoparamkeys       off
...

내가 사용할 때 set +o:

❯ set +o
set +o noaliases
set +o aliasfuncdef
set +o allexport
set +o noalwayslastprompt
set -o alwaystoend
set +o appendcreate
set +o noappendhistory
set -o autocd
set +o autocontinue
set +o noautolist
set +o noautomenu
...

set -oon/off를 사용하고 set +o+o/-o를 사용하세요.

유사성을 알 수 있는데 왜 사용됩니까 +o/-o?

답변1

어떤 것들은 그렇게 되기 때문에 그렇습니다. 누군가가 그렇게 될 것이라고 결정했습니다.

If -o is supplied with no option-name, the values of the
current  options are printed.  If +o is supplied with no
option-name, a series of set commands  to  recreate  the
current  option  settings  is  displayed on the standard
output.

+o따르거나 -o논쟁을 벌이는 경우에는 다른 의미를 -갖습니다 .+

관련 정보