Update .zshenv
Update .zshenv
Update .zshrc
Personal .zshrc
, .zshenv
, scripts and settings.
https://gitlab.com/grauwoelfchen/DotZsh
% cd
% mkdir ~/.zfunc
% git clone git@gitlab.com:grauwoelfchen/dotzsh.git && cd .zsh
% git submodule update --init
Let's use seasonal prompt! See ~/.zshrc
.
# winter
PROMPT="%F{239}%m%f %F{105}%~%f \$(git_prompt)\$(uptime | \
awk -F': ' '{ print \$2 }')
%F{153}❯❯❯%f "
# spring
PROMPT="%F{029}%m%f %F{077}%~%f \$(git_prompt)\$(uptime | awk -F' ' '{ print \$4 }')
#%F{219}❯❯❯%f "
# summer
PROMPT="%F{026}%m%f %F{074}%~%f \$(git_prompt)\$(uptime | awk -F' ' '{ print \$4 }')
#%F{103}❯❯❯%f "
It will be something like this:
stockhorn ~/.atelier/usr/share/path/to/a/repository/ master 0.21, 0.28, 0.17
❯❯❯ _
or just use gentoo
like prompt.
# gentoo
autoload -U promptinit
promptinit
prompt gentoo
.zshrc
Put .zshrc.private
into .zsh
directory, if you want to put sensitive value
in zshrc.
.sh.d
Shared scripts in .sh.d
directory are universal. (zsh, bash)
.env
autoloadingThe astostash/stash/unstash functions are available by zsh-autoenv.
To load environment variables from .env
, put .autoenv.zsh
like this:
while read -r line; do; local var=$(echo "$(eval echo $line)"); autostash $var; done < ./.env
See .autoenv.zsh.sample
or use direnv.
The files will be loaded by following order.
/etc/zsh/zshenv
$HOME/.zshenv
/etc/zsh/zprofile
and $HOME/.zprofile
/etc/zshrc
and $HOME/.zshrc
/etc/zsh/zlogin
and $HOME/.zlogin
/etc/zsh/zprofile
of Gentoo clears environment variables with unset
.
% sudo mv /etc/zsh/{zprofile,zprofile.orig}
Copyright (c) 2013-2024 Yasha
This is free software: You can redistribute it and/or modify it under the terms of the GUN General Public License as published by the Free Software Foundation.
See LICENSE. (GPL-2.0
)