Skip to content

Instantly share code, notes, and snippets.

@psbarrales
Created January 3, 2022 18:15
Show Gist options
  • Save psbarrales/882960a125feb774aa9186d0faafa155 to your computer and use it in GitHub Desktop.
Save psbarrales/882960a125feb774aa9186d0faafa155 to your computer and use it in GitHub Desktop.
Bash function to do a change directory and apply .env file
#!/bin/bash
dev() {
[[ ! -z "$1" ]] && cd $1 && set -a
source .env
set +a
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment