Bug#622933: [Pkg-zsh-devel] Bug#622933: Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Hello Frank, Hello Daniel, nice to see Zsh is actively maintained in Debian. ;) Merely i was referring that the intention of the original patch as i understand was to make the whole pattern case-insensitive, not only the first part of it. Just documented public in the bug report for other interested readers. I have no strong opinion on whether or not this actually makes it in the official Debian package. That being said... Daniel Shahaf schrieb/wrote: > Frank Terbeck wrote on Mon, 10 Sep 2018 02:27 +0200: >> In the meantime (it's been more than seven years), I've changed my mind >> about this. I think a vendor should do as little as possible in their >> global configuration files. -- -- > So, I guess what Frank and I are saying is: if you want better defaults, > work with upstream on making that happen. -- -- > P.S. How about adding a mention of newuser.zshrc.recommended to >README.Debian, so it's more discoverable? > >> ¹ A case could be made that this is overstepping the boundaries already. >> And maybe that's true. Getting keyboard handling in a terminal right >> is a hard task, however. It requires intimate knowledge about some of >> the subtleties of how terminals work and about the facilities zsh of- >> fers to work with those. It would be much better, if zsh did some of >> this out of the box, but alas it doesn't. (The rationale is to not >> break existing setups — and that's a valid argument, too.) ... I fully agree on all of this especially the part about keyboard setup. Which is certainly not an easy task for newcomers. Regarding the original request i think the options are: 1) as mentioned make upstream include it. 2) Include commented parts in debian stock /etc/zsh*. IMHO the file /etc/inputrc is a good example for this. 3) Factor out a "zsh-debian-extras" package. kind regards, Thilo
Bug#622933: [Pkg-zsh-devel] Bug#622933: Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Frank Terbeck wrote on Mon, 10 Sep 2018 02:27 +0200: > In the meantime (it's been more than seven years), I've changed my mind > about this. I think a vendor should do as little as possible in their > global configuration files. Agreed, but there's more to it. compinit is an incredibly useful setting and it should be easy for new users to discover it. Debian does this via /etc/zsh/newuser.zshrc.recommended. Upstream does this via zsh-newuser-install. Both of these already set up compinit. Upstream's default settings are minimal, and I don't know if that will change, but there is interest upstream in making it easy for new users to discover useful settings, such as the zstyle settings in upstream's StartupFiles/zshrc. So, I guess what Frank and I are saying is: if you want better defaults, work with upstream on making that happen. Cheers, Daniel P.S. How about adding a mention of newuser.zshrc.recommended to README.Debian, so it's more discoverable? > ¹ A case could be made that this is overstepping the boundaries already. > And maybe that's true. Getting keyboard handling in a terminal right > is a hard task, however. It requires intimate knowledge about some of > the subtleties of how terminals work and about the facilities zsh of- > fers to work with those. It would be much better, if zsh did some of > this out of the box, but alas it doesn't. (The rationale is to not > break existing setups — and that's a valid argument, too.)
Bug#622933: [Pkg-zsh-devel] Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Hi, TS wrote: [...] > Replying here because i think the patch that never got applied > should look like: In the meantime (it's been more than seven years), I've changed my mind about this. I think a vendor should do as little as possible in their global configuration files. We already do a fair bit with regard to key- board setup.¹ But compsys is much more expensive in comparison, and al- most all zsh user will call this in their zshrc file anyway. And all of those people, we'll force to create a .zshenv file just to to revert a change in a vendor file. In short, I am firmly against doing this. Regards, Frank ¹ A case could be made that this is overstepping the boundaries already. And maybe that's true. Getting keyboard handling in a terminal right is a hard task, however. It requires intimate knowledge about some of the subtleties of how terminals work and about the facilities zsh of- fers to work with those. It would be much better, if zsh did some of this out of the box, but alas it doesn't. (The rationale is to not break existing setups — and that's a valid argument, too.)
Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Hello Frank, again i learned sth. useful. THANKS! Replying here because i think the patch that never got applied should look like: - ((#i)on|yes|enable|1) ;; + ((#i)(on|yes|enable|1)) ;; best regards, Thilo
Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Daniel Hahler wrote: >> (( ${+parameters[skip_global_compinit]} )) && unset skip_global_compinit > > I suggest leaving this variable set, instead of unsetting it. > > This way it could get used in a user's zshrc file for example, like > "when we're on Debian/Ubuntu and skip_global_compinit is not set, then I > have to do it myself here. Personally, I'd want the variable name space polluted as little as possible. And there are numerous ways to check whether compsys is loaded or not without yet another variable. Regards, Frank -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
> (( ${+parameters[skip_global_compinit]} )) && unset skip_global_compinit I suggest leaving this variable set, instead of unsetting it. This way it could get used in a user's zshrc file for example, like "when we're on Debian/Ubuntu and skip_global_compinit is not set, then I have to do it myself here. Just a thought. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Frank Terbeck wrote: > Daniel Hahler wrote: [...] > ((#i)on|yes|enable|1) ;; [...] > Comments? (#i) requires `extended_glob' to be set, which may or may not be the case. I could make it work properly but it's too much work. We should drop the (#i) and live with the fact that the check is case sensitive. :) Regards, Frank -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Daniel Hahler wrote: > In Ubuntu, the attached patch was applied to achieve the following: > > - debian/zshrc: Enable completions by default, unless > skip_global_compinit is set Daniel informed me of this patch on IRC. I think it's a reasonable thing to have. I'd just do it slightly different: case $skip_global_compinit in ((#i)on|yes|enable|1) ;; (*) autoload -Uz compinit compinit ;; esac (( ${+parameters[skip_global_compinit]} )) && unset skip_global_compinit On top of that, I want proper documentation of the behaviour and how to trigger it in `README.debian'. Comments? Regards, Frank -- In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#622933: zsh: Enable completions by default, unless skip_global_compinit is set
Package: zsh Version: 4.3.11-4 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch In Ubuntu, the attached patch was applied to achieve the following: - debian/zshrc: Enable completions by default, unless skip_global_compinit is set This is the last delta between Debian's and Ubuntu's zsh package. Thanks for considering the patch. -- System Information: Debian Release: squeeze/sid APT prefers natty APT policy: (500, 'natty'), (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick-proposed'), (500, 'maverick'), (150, 'testing'), (10, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.38-8-generic (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash diff -Nru zsh-4.3.11/debian/zshrc zsh-4.3.11/debian/zshrc --- zsh-4.3.11/debian/zshrc 2011-03-03 14:23:07.0 +0100 +++ zsh-4.3.11/debian/zshrc 2011-03-09 18:39:56.0 +0100 @@ -41,3 +41,11 @@ unalias run-help autoload run-help + +# If you don't want compinit called here, place the line +# skip_global_compinit=1 +# in your $ZDOTDIR/.zshenv or $ZDOTDIR/.zprofice +if [[ -z "$skip_global_compinit" ]]; then + autoload -U compinit + compinit +fi