Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Asking ZSH: How are you ?

    Hi Meino :)

 * Meino Christian Cramer <Meino.Cramer@xxxxxx> dixit:
>        When listing options (*** by `setopt', `unsetopt', `set -o' or
>        `set +o'***), those turned on by default appear in the list
>        prefixed with `no'.  Hence (unless KSH_OPTION_PRINT is set),
>        `setopt' shows all options whose settings are changed from the
>        default.
>   but giving "setopt +o" or "setopt -o"
>   always gives me (even for setopt +o!):
> 	   setopt: string expected after -o

    Of course it does, it's correct ;) You're mixing 'set +o/-o' with
'setopt' and 'unsetopt'. If you want to list all options use
'setopt', without arguments, or 'set -o'. If you want to show ALL
options, no matter if they have their default value or not, use this
little snippet (for example):

    for option in ${(ko)options}; print ${(r:21:}option $options[$option]

    This will give you the list of all option names followed by its
value. I find this easier to understand that the default of prefixing
with 'no' and the like.

    Raúl Núñez de Arenas Coronado

Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...

Messages sorted by: Reverse Date, Date, Thread, Author