* Asking ZSH: How are you ? @ 2005-07-09 14:52 Meino Christian Cramer 2005-07-09 15:17 ` DervishD 2005-07-09 16:07 ` Bart Schaefer 0 siblings, 2 replies; 15+ messages in thread From: Meino Christian Cramer @ 2005-07-09 14:52 UTC (permalink / raw) To: zsh-users Hi, what commands I have to give to ZSH to show all "internal" settings? Up to now I found unsetopt/setopt/bindkey.... (by the way: The manual says: 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 ...no nitpicking...just as an info. May confuse newbies like me..... :O) Keep zshing! Meino ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 14:52 Asking ZSH: How are you ? Meino Christian Cramer @ 2005-07-09 15:17 ` DervishD 2005-07-09 15:37 ` Meino Christian Cramer 2005-07-09 20:26 ` Thorsten Kampe 2005-07-09 16:07 ` Bart Schaefer 1 sibling, 2 replies; 15+ messages in thread From: DervishD @ 2005-07-09 15:17 UTC (permalink / raw) To: Meino Christian Cramer; +Cc: zsh-users Hi Meino :) * Meino Christian Cramer <Meino.Cramer@gmx.de> 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... ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 15:17 ` DervishD @ 2005-07-09 15:37 ` Meino Christian Cramer 2005-07-09 16:06 ` Christian Taylor 2005-07-09 17:32 ` DervishD 2005-07-09 20:26 ` Thorsten Kampe 1 sibling, 2 replies; 15+ messages in thread From: Meino Christian Cramer @ 2005-07-09 15:37 UTC (permalink / raw) To: zsh; +Cc: zsh-users From: DervishD <zsh@dervishd.net> Subject: Re: Asking ZSH: How are you ? Date: Sat, 9 Jul 2005 17:17:36 +0200 > Hi Meino :) Hi :)) > * Meino Christian Cramer <Meino.Cramer@gmx.de> 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'. Oohh..damn...yes, of course! You are absolutely right...it must be an .....hrrrm.... pixel defect on my....MONITOR! ;) > 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] > I pasted that to the commandline (zsh 4.2.5) and pressed <RETURN>. I > got zsh: error in flags I checked several times for....hrrrmmm.....PIXEL ERRORS....but found none. > 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. Yes, me too... > Raúl Núñez de Arenas Coronado Happy zshing! Meino > -- > 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... > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 15:37 ` Meino Christian Cramer @ 2005-07-09 16:06 ` Christian Taylor 2005-07-09 17:35 ` DervishD 2005-07-09 17:32 ` DervishD 1 sibling, 1 reply; 15+ messages in thread From: Christian Taylor @ 2005-07-09 16:06 UTC (permalink / raw) To: zsh-users Meino Christian Cramer wrote: > > 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] > > I pasted that to the commandline (zsh 4.2.5) and pressed <RETURN>. I got > zsh: error in flags I believe Raul meant: for option in ${(ko)options}; print ${(r:21:)option} $options[$option] Thanks for the tip Raul, I like this better than the "no" prefixes too. Christian ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 16:06 ` Christian Taylor @ 2005-07-09 17:35 ` DervishD 0 siblings, 0 replies; 15+ messages in thread From: DervishD @ 2005-07-09 17:35 UTC (permalink / raw) To: Christian Taylor; +Cc: zsh-users Hi Christian :) * Christian Taylor <cht@chello.at> dixit: > Meino Christian Cramer wrote: > > > 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] > > > > I pasted that to the commandline (zsh 4.2.5) and pressed <RETURN>. I got > > zsh: error in flags > I believe Raul meant: > for option in ${(ko)options}; print ${(r:21:)option} $options[$option] Yes ;) As I told Meino, probably my keyboard's fault XDDD > Thanks for the tip Raul, I like this better than the "no" prefixes too. You're welcome, but the tip is not such 'tip': since zsh is such a darn good shell, it provides you with the 'options' associative array (there are plenty of them, very useful information for the script writers), it's just a matter of dumping it. Zsh IS great. 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... ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 15:37 ` Meino Christian Cramer 2005-07-09 16:06 ` Christian Taylor @ 2005-07-09 17:32 ` DervishD 2005-07-09 18:10 ` Meino Christian Cramer 1 sibling, 1 reply; 15+ messages in thread From: DervishD @ 2005-07-09 17:32 UTC (permalink / raw) To: Meino Christian Cramer; +Cc: zsh-users Hi Meino :) * Meino Christian Cramer <Meino.Cramer@gmx.de> dixit: > > * Meino Christian Cramer <Meino.Cramer@gmx.de> 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'. > Oohh..damn...yes, of course! You are absolutely right...it must be > an .....hrrrm.... pixel defect on my....MONITOR! ;) Yes, I know, it happens to me, too, see below ;)))) > > 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] > > > I pasted that to the commandline (zsh 4.2.5) and pressed <RETURN>. I > > got > > zsh: error in flags > > I checked several times for....hrrrmmm.....PIXEL ERRORS....but found none. Probably my monitor had pixel errors, or maybe my keyboard decided to omit certain keypresses I certainly did XDDDD Try this: for option in ${(ko)options}; print ${(r:21:}option} $options[$option] I missed the curly brace at the end of 'option' reference, sorry O:) We better blame it on our monitors, keyboards... whatever XD 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... ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 17:32 ` DervishD @ 2005-07-09 18:10 ` Meino Christian Cramer 0 siblings, 0 replies; 15+ messages in thread From: Meino Christian Cramer @ 2005-07-09 18:10 UTC (permalink / raw) To: zsh; +Cc: zsh-users From: DervishD <zsh@dervishd.net> Subject: Re: Asking ZSH: How are you ? Date: Sat, 9 Jul 2005 19:32:30 +0200 Hi Raúl ! ...thanks a lot for your reply! Now I know howto fix the ....pixel errors on my....MONITOR..... can easily be fixed. Next I will check my keyboard... :))))) :D Thanks to this nice community, too !!! Yes, ZSH is a great tool! When I only would adsorb all the "inner values" much faster...and understand them with the first try... Happy zshing! Meino > Hi Meino :) > > * Meino Christian Cramer <Meino.Cramer@gmx.de> dixit: > > > * Meino Christian Cramer <Meino.Cramer@gmx.de> 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'. > > Oohh..damn...yes, of course! You are absolutely right...it must be > > an .....hrrrm.... pixel defect on my....MONITOR! ;) > > Yes, I know, it happens to me, too, see below ;)))) > > > > 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] > > > > > I pasted that to the commandline (zsh 4.2.5) and pressed <RETURN>. I > > > got > > > > zsh: error in flags > > > > I checked several times for....hrrrmmm.....PIXEL ERRORS....but found none. > > Probably my monitor had pixel errors, or maybe my keyboard > decided to omit certain keypresses I certainly did XDDDD > > Try this: > > for option in ${(ko)options}; print ${(r:21:}option} $options[$option] > > I missed the curly brace at the end of 'option' reference, sorry > O:) We better blame it on our monitors, keyboards... whatever XD > > 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... > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 15:17 ` DervishD 2005-07-09 15:37 ` Meino Christian Cramer @ 2005-07-09 20:26 ` Thorsten Kampe 2005-07-10 7:18 ` DervishD 1 sibling, 1 reply; 15+ messages in thread From: Thorsten Kampe @ 2005-07-09 20:26 UTC (permalink / raw) To: zsh-users * DervishD (2005-07-09 16:17 +0100) > * Meino Christian Cramer <Meino.Cramer@gmx.de> 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 20:26 ` Thorsten Kampe @ 2005-07-10 7:18 ` DervishD 2005-07-10 11:38 ` Thorsten Kampe 0 siblings, 1 reply; 15+ messages in thread From: DervishD @ 2005-07-10 7:18 UTC (permalink / raw) To: Thorsten Kampe; +Cc: zsh-users Hi Thorsten :) * Thorsten Kampe <thorsten@thorstenkampe.de> dixit: > > for option in ${(ko)options}; print ${(r:21:}option $options[$option] > Isn't that a bit "too much"? > > "autoload -U allopt; allopt" or "set -o" shows you all options and > there state. Have you looked at the code for 'allopt'? I think that *that* is too much ;) This is shorter and produces more or less the same results. And you can store it in a function, of course. The only advantage of 'allopt' is that it accepts a list of names or part of names to search for using grep. But that is easily added to the above, too. 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... ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-10 7:18 ` DervishD @ 2005-07-10 11:38 ` Thorsten Kampe 2005-07-10 16:26 ` Bart Schaefer 0 siblings, 1 reply; 15+ messages in thread From: Thorsten Kampe @ 2005-07-10 11:38 UTC (permalink / raw) To: zsh-users * DervishD (2005-07-10 08:18 +0100) > * Thorsten Kampe <thorsten@thorstenkampe.de> dixit: >>> for option in ${(ko)options}; print ${(r:21:}option $options[$option] >> Isn't that a bit "too much"? >> >> "autoload -U allopt; allopt" or "set -o" shows you all options and >> there state. > > Have you looked at the code for 'allopt'? I think that *that* is > too much ;) Maybe for the one who wrote it but not for the one who uses allopt. "allopt" was the way to go before "set -o" was introduced recently. Before that you had to do "setopt kshoptionprint; setopt; unsetopt" which of course in a way was inaccurate because "kshoptionprint" was modified. T. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-10 11:38 ` Thorsten Kampe @ 2005-07-10 16:26 ` Bart Schaefer 2005-07-11 18:27 ` Meino Christian Cramer 0 siblings, 1 reply; 15+ messages in thread From: Bart Schaefer @ 2005-07-10 16:26 UTC (permalink / raw) To: zsh-users On Jul 10, 12:38pm, Thorsten Kampe wrote: } Subject: Re: Asking ZSH: How are you ? } } * DervishD (2005-07-10 08:18 +0100) } > Have you looked at the code for 'allopt'? I think that *that* is } > too much ;) } } "allopt" was the way to go before "set -o" was introduced recently. } Before that you had to do "setopt kshoptionprint; setopt; unsetopt" "allopt" could be improved by switching to "set -o" but that isn't really why it was written. It was written to eliminate the double negatives in the output. Run diff =(set -o) =(allopt) and you'll see e.g. 1c1 < noaliases off --- > aliases on 3c3 < noalwayslastprompt off --- > alwayslastprompt on (etc.) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-10 16:26 ` Bart Schaefer @ 2005-07-11 18:27 ` Meino Christian Cramer 0 siblings, 0 replies; 15+ messages in thread From: Meino Christian Cramer @ 2005-07-11 18:27 UTC (permalink / raw) To: schaefer; +Cc: zsh-users From: Bart Schaefer <schaefer@brasslantern.com> Subject: Re: Asking ZSH: How are you ? Date: Sun, 10 Jul 2005 16:26:37 +0000 Hi, :) sourceing reporter works fine ! hanks for the hint ! Meino > On Jul 10, 12:38pm, Thorsten Kampe wrote: > } Subject: Re: Asking ZSH: How are you ? > } > } * DervishD (2005-07-10 08:18 +0100) > } > Have you looked at the code for 'allopt'? I think that *that* is > } > too much ;) > } > } "allopt" was the way to go before "set -o" was introduced recently. > } Before that you had to do "setopt kshoptionprint; setopt; unsetopt" > > "allopt" could be improved by switching to "set -o" but that isn't > really why it was written. It was written to eliminate the double > negatives in the output. > > Run > > diff =(set -o) =(allopt) > > and you'll see e.g. > > 1c1 > < noaliases off > --- > > aliases on > 3c3 > < noalwayslastprompt off > --- > > alwayslastprompt on > > (etc.) > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 14:52 Asking ZSH: How are you ? Meino Christian Cramer 2005-07-09 15:17 ` DervishD @ 2005-07-09 16:07 ` Bart Schaefer 2005-07-10 4:30 ` Meino Christian Cramer 1 sibling, 1 reply; 15+ messages in thread From: Bart Schaefer @ 2005-07-09 16:07 UTC (permalink / raw) To: zsh-users On Jul 9, 4:52pm, Meino Christian Cramer wrote: } } what commands I have to give to ZSH to show all "internal" settings? Read "man zshcontrib" (or the "User contributions" section in "info zsh") and look for the section named "Dumping Shell State". ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-09 16:07 ` Bart Schaefer @ 2005-07-10 4:30 ` Meino Christian Cramer 2005-07-10 16:12 ` Bart Schaefer 0 siblings, 1 reply; 15+ messages in thread From: Meino Christian Cramer @ 2005-07-10 4:30 UTC (permalink / raw) To: schaefer; +Cc: zsh-users From: Bart Schaefer <schaefer@brasslantern.com> Subject: Re: Asking ZSH: How are you ? Date: Sat, 09 Jul 2005 16:07:46 +0000 I tried reporter. But for example alias given on the commandline gives me a lot more aliasses defined as reported by "reporter all" (only dumps two aliasses) So I cannot decide whether I can trust the rest of the output of reporter. > On Jul 9, 4:52pm, Meino Christian Cramer wrote: > } > } what commands I have to give to ZSH to show all "internal" settings? > > Read "man zshcontrib" (or the "User contributions" section in "info zsh") > and look for the section named "Dumping Shell State". > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Asking ZSH: How are you ? 2005-07-10 4:30 ` Meino Christian Cramer @ 2005-07-10 16:12 ` Bart Schaefer 0 siblings, 0 replies; 15+ messages in thread From: Bart Schaefer @ 2005-07-10 16:12 UTC (permalink / raw) To: zsh-users On Jul 10, 6:30am, Meino Christian Cramer wrote: } Subject: Re: Asking ZSH: How are you ? } } alias } } given on the commandline gives me a lot more aliasses defined as } reported by "reporter all" (only dumps two aliasses) Let me guess: alias run-help=man alias which-command=whence I suspect you're not using reporter correctly. Those are the two built- in aliases. You can't run "reporter" as a shell script. (Well, you can, but it won't give the correct results; it'll tell you what's in your /etc/zshenv, and not much else.) It has to be either read into the current shell with the "." or "source" commands, or autoloaded and then run as a shell function. E.g. source reporter aliases ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-07-11 18:27 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-07-09 14:52 Asking ZSH: How are you ? Meino Christian Cramer 2005-07-09 15:17 ` DervishD 2005-07-09 15:37 ` Meino Christian Cramer 2005-07-09 16:06 ` Christian Taylor 2005-07-09 17:35 ` DervishD 2005-07-09 17:32 ` DervishD 2005-07-09 18:10 ` Meino Christian Cramer 2005-07-09 20:26 ` Thorsten Kampe 2005-07-10 7:18 ` DervishD 2005-07-10 11:38 ` Thorsten Kampe 2005-07-10 16:26 ` Bart Schaefer 2005-07-11 18:27 ` Meino Christian Cramer 2005-07-09 16:07 ` Bart Schaefer 2005-07-10 4:30 ` Meino Christian Cramer 2005-07-10 16:12 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).