Skip to content

Commit

Permalink
feat: Adding dot_env parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Aug 5, 2023
1 parent e7c23eb commit 8b1c12c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sources/dev
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ loop() {
done
}

dot_env() {
local DOTENV_FILE="${1:-.env}"

if [[ -e ${DOTENV_FILE} ]]; then
comm -13 <(declare) <(source "${DOTENV_FILE}" && declare)
fi
}

meteo() {
curl --disable --silent --show-error --location --max-time 30 -4 "wttr.in/${1:-Paris}?m&format=v2"
}
Expand Down

0 comments on commit 8b1c12c

Please sign in to comment.