diff --git a/lib/completions.sh b/lib/completions.sh index 5df165c..8eceda8 100644 --- a/lib/completions.sh +++ b/lib/completions.sh @@ -5,7 +5,7 @@ _u7_complete_entities() { COMPREPLY=($(compgen -W "ip csv json line ssl files diff cpu memory disk processes ports port usage network git env log http docker system definition functions --help" -- "$cur")) ;; make|mk) - COMPREPLY=($(compgen -W "dir file password user copy link archive clone template sequence --help" -- "$cur")) + COMPREPLY=($(compgen -W "dir file password user copy link archive clone template sequence env --help" -- "$cur")) ;; drop|dr) COMPREPLY=($(compgen -W "file dir dirs files line lines column duplicates process user docker --help" -- "$cur")) @@ -46,6 +46,7 @@ _u7_complete_args() { make|mk) case "$entity" in copy|link) _filedir ;; + env) COMPREPLY=($(compgen -W "from" -- "$cur")) ;; template) COMPREPLY=($(compgen -W "python node bash web" -- "$cur")) ;; esac ;; diff --git a/lib/make.sh b/lib/make.sh index c349105..ab30554 100644 --- a/lib/make.sh +++ b/lib/make.sh @@ -170,6 +170,36 @@ _u7_make() { esac ;; + env) + local template=".env.example" + local output=".env" + + if [[ "$1" == "from" ]]; then + if [[ -z "$2" ]]; then + echo "Usage: u7 mk env from