mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
add dotenv plugin
This commit is contained in:
parent
918d26e7db
commit
dca4f76844
2 changed files with 44 additions and 0 deletions
10
plugins/dotenv/dotenv.plugin.zsh
Normal file
10
plugins/dotenv/dotenv.plugin.zsh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/zsh
|
||||
|
||||
source_env() {
|
||||
if [[ -f .env ]]; then
|
||||
source .env
|
||||
fi
|
||||
}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook chpwd source_env
|
||||
Loading…
Add table
Add a link
Reference in a new issue