]> git.sev.monster Git - dotfiles.git/commitdiff
zsh: compact path glob, avoid double source
authorsev <git@sev.monster>
Sun, 23 Jul 2023 23:39:23 +0000 (18:39 -0500)
committersev <git@sev.monster>
Fri, 5 Apr 2024 21:27:40 +0000 (16:27 -0500)
base/.zshenv
etc/zsh/.zlogin
etc/zsh/.zprofile

index f6f0646c6db203ff132321249de281e916c87ad6..45ea3392b6130062cb6a8b789d38dcf4aee6099d 100644 (file)
@@ -24,7 +24,8 @@ if [[ ! -v _sev_first_display && ( -v DISPLAY || -v WAYLAND_DISPLAY ) ]] {
     #      exported; for example, this previously happened with sway without a
     #      display manager or launcher in front of it
     export _sev_first_display=
-    _sev_refresh_gpgagent= source ${ZDOTDIR:-~}/.zprofile
+    _sev_refresh_gpgagent=
+    [[ ! -o login ]] && source ${ZDOTDIR:-~}/.zprofile
 } elif [[ ! -o login && $SHLVL -eq 1 && ${+TERMUX_VERSION} -eq 0 ]] {
     ### early zprofile sourcing for first shell even if not a login shell
     source ${ZDOTDIR:-~}/.zprofile
index 612209e531a74313cf938457c920a24508cb3cd8..8b4aab61354d771a0d9c61ddc91c626f6541ddbc 100644 (file)
@@ -4,4 +4,4 @@
 if [[ -f ${ZDOTDIR:-~}/.zlogin.local ]] { source ${ZDOTDIR:-~}/.zlogin.local }
 
 ### cd for convenience
-[[ -o login ]] && cd ${_sev_home:-~}
+cd ${_sev_home:-~}
index 9b93f41e22f8e4c97edcb52951fd6bd432fa7107..ec88809723eacd08a88e821ad8d30df720ceec57 100644 (file)
@@ -79,9 +79,7 @@ if [[ ! -v _sev_setup_path || -o login ]] {
     # XXX: XDG specifies ~/.local/bin as the only user-writable dir for
     #      executables, but we specify more; technically this is against spec
     syspath=("$path[@]")
-    path=(~/{.local/,}{s,}bin
-          {~/.local,{$PREFIX,}{,/opt,/usr{,/local,pkg}}}/sbin
-          {~/.local,{$PREFIX,}{,/opt,/usr{,/local,pkg}}}/bin
+    path=({{${_sev_home:-~},~}{/.local,},{$PREFIX,}{,/opt,/usr{,/local,/pkg}}}/{s,}bin
           /usr/{X11R{7,6}/bin,games})
     ((len=$#path))
     path=("$path[@]" "$syspath[@]")
This page took 0.034929 seconds and 4 git commands to generate.