dbt-labs / dbt-completion.bash

Adds autocompletion to the dbt CLI
https://www.getdbt.com/
Apache License 2.0
116 stars 29 forks source link

Add fetching dbt project dir from environment variable #24

Closed polmonso closed 2 months ago

polmonso commented 2 months ago

Dbt uses DBT_PROJECT_DIR to specify the dbt project location so one can run dbt run from anywhere.

This PR adds support for using that environment variable to find the dbt_project.yml if defined. Otherwise fallsback to the current behaviour.

b-per commented 2 months ago

Thanks for raising this!

I will just close this one and merge the new #25 instead. It has the same behaviour but moves the logic to the actual _get_project_root() function, and it is implemented for both bash and zsh.