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

Re: Asking ZSH: How are you ?



* DervishD (2005-07-09 16:17 +0100)
>  * 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.

Isn't that a bit "too much"?

"autoload -U allopt; allopt" or "set -o" shows you all options and
there state.



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