mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
add dotenv plugin (#4373)
This commit is contained in:
parent
3b13dc07d8
commit
8d35fa0e2f
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