EasyEngine / docker-compose-wordpress

Work in progress! 👷
https://easyengine.io/blog/how-we-plan-to-use-docker-in-easyengine-v4/
MIT License
29 stars 14 forks source link

Added 'ee4 list' command #35

Closed dharmin closed 6 years ago

dharmin commented 6 years ago

Fix #32

mbtamuli commented 6 years ago

Escape characters showing up.

> ee4 list
\e[1;31mNo sites have been created.
-----
> ee4 list

\e[1;32mList of Sites:

\e[1;38;5;25mexample.com
notasite
simplefolder
zzz.test
mbtamuli commented 6 years ago

@dharmin Currently it is displaying even text files and random directories in the webroot. Use find to only filter only (1)directories which (2)contain a docker-compose.yml file.

mbtamuli commented 6 years ago

At the current state, it correctly lists sites only, but output is wrong.

> ls -al
total 0
drwxr-xr-x  6 rtc 192 Feb 13 12:40 .
drwxr-xr-x 14 rtc 448 Feb 13 12:53 ..
drwxr-xr-x  7 rtc 224 Feb 13 12:38 example.com
drwxr-xr-x  2 rtc  64 Feb 13 12:39 notasite
drwxr-xr-x  2 rtc  64 Feb 13 12:40 test
drwxr-xr-x  7 rtc 224 Feb 13 12:40 zzz.test
> ee4 list
List of Sites:

examplecom
zzztest

It removes the period.

dharmin commented 6 years ago

Fixed. Used cut command instead of tr to fix it

mbtamuli commented 6 years ago

LGTM