For certain options, setopt doesn't have an effect.  ~  setopt | grep historyextendedhistory  ~  setopt appendhistory  ~  setopt | grep history # appendhistory apparently didn't get setextendedhistory  ~  setopt sharehistory  ~  setopt | grep history # but sharehistory doesextendedhistorysharehistoryWhy?
strange setopt behavior
zsh
setopt outputs the deviation from the current emulation mode. appendhistory is set by default in zsh emulation.To display the status of all options, you can use set -o.Quoting the doc: If no arguments are supplied, the names of all options currently set are printed.  The form is chosen so as to minimize the differences from the default options for the current emulation (the default emulation being native zsh, shown as <Z> in *note Description of Options::).  Options that are on by default for the emulation are shown with the prefix no only if they are off, while other options are shown without the prefix no and only if they are on.  In addition to options changed from the default state by the user, any options activated automatically by the shell (for example, SHIN_STDIN or INTERACTIVE) will be shown in the list.  The format is further modified by the option KSH_OPTION_PRINT, however the rationale for choosing options with or without the no prefix remains the same in this case.