[Pkg-zsh-devel] Bug#1036290: Support ~/.config; set ZDOTDIR in zshenv
Jörg Sommer
joerg at jo-so.de
Thu May 18 18:29:36 BST 2023
Package: zsh
Version: 5.9-4+b2
Severity: wishlist
Hi,
what's your opinion about the following patch for /etc/zsh/zshenv? It sets
ZDOTDIR to ~/.config/zsh if a Zsh config file exists in this directory. This
gives Zsh support for the XDG directory standard.
https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html
```diff
--- /tmp/zshenv 2023-05-18 19:16:39.134041352 +0200
+++ debian/zshenv 2023-05-18 19:16:57.286240552 +0200
@@ -16,3 +16,10 @@
then
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi
+
+if [[ -z ${ZDOTDIR:-} &&
+ -z $(echo $HOME/.(zlogin|zlogout|zprofile|zshenv|zshrc)(N)) &&
+ -n $(echo ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.(zlogin|zlogout|zprofile|zshenv|zshrc)(N)) ]]
+then
+ ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh
+fi
```
Kind regards Jörg
-- Package-specific info:
Packages which provide code meant to be sourced in .zshrc:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=======================-============-============-==================================================
ii grml-rescueboot 0.5.2 all Integrates Grml ISO booting into GRUB
ii zsh-autosuggestions 0.7.0-1 all Fish-like fast/unobtrusive autosuggestions for zsh
ii zsh-syntax-highlighting 0.7.1-2 all Fish shell like syntax highlighting for zsh
Packages which provide vendor completions:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-===============-============-===========================================================
ii bubblewrap 0.8.0-2 amd64 utility for unprivileged chroot and namespace manipulation
ii cargo 0.66.0+ds1-1 amd64 Rust package manager
ii curl 7.88.1-9 amd64 command line tool for transferring data with URL syntax
ii dpkg-dev 1.21.22 all Debian package development tools
ii khal 1:0.10.5-1.1 all Standards based CLI and terminal calendar program
ii lua-busted 2.1.2-1 all Lua unit testing framework focused on ease of use
ii meson 1.0.1-5 all high-productivity build system
ii mpv 0.35.1-4 amd64 video player based on MPlayer/mplayer2
ii ninja-build 1.11.1-1 amd64 small build system closest in spirit to Make
ii pulseaudio-utils 16.1+dfsg1-2+b1 amd64 Command line tools for the PulseAudio sound server
ii restic 0.14.0-1+b5 amd64 backup program with multiple revisions, encryption and more
ii systemd 253-1 amd64 system and service manager
ii systemd-coredump 253-1 amd64 tools for storing and retrieving coredumps
ii systemd-resolved 253-1 amd64 systemd DNS resolver
ii udev 252.6-1 amd64 /dev/ and hotplug management daemon
ii vlc-bin 3.0.18-2 amd64 binaries from VLC
dpkg-query: no path found matching pattern /usr/share/zsh/vendor-functions/
-- System Information:
Debian Release: 12.0
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.3.0-0-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages zsh depends on:
ii debianutils 5.7-0.4
ii libc6 2.36-9
ii libcap2 1:2.66-4
ii libtinfo6 6.4-4
ii zsh-common 5.9-4
Versions of packages zsh recommends:
ii libc6 2.36-9
ii libgdbm6 1.23-3
ii libncursesw6 6.4-4
ii libpcre3 2:8.39-15
Versions of packages zsh suggests:
ii zsh-doc 5.9-4
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 269 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-zsh-devel/attachments/20230518/6d603c3b/attachment.sig>
More information about the Pkg-zsh-devel
mailing list