feat: zsh-xdg-setup
This commit is contained in:
parent
61fac023fd
commit
af4234464f
2 changed files with 11 additions and 0 deletions
|
@ -63,3 +63,5 @@ Add this to `/etc/zsh/zshenv` (**macOS**: `/etc/zshenv`)
|
|||
|
||||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
||||
```
|
||||
|
||||
Or run `./zsh-xdg-setup` as root
|
||||
|
|
9
zsh-xdg-setup
Executable file
9
zsh-xdg-setup
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ "${EUID:-$(id -u)}" -eq 0 ] || { >&2 echo "Please run this as root."; exit 1; }
|
||||
|
||||
echo """#!/bin/zsh
|
||||
|
||||
export ZDOTDIR=\"\${XDG_CONFIG_HOME:-\$HOME/.config}/zsh\"""" > /etc/__zshenv && \
|
||||
mv -i /etc/__zshenv /etc/zshenv
|
||||
ln -si /etc/zshenv /etc/zsh/zshenv
|
Loading…
Add table
Add a link
Reference in a new issue