From d89a47cad6e2230c72b98a11b437aef54e7d89ea Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Thu, 13 Nov 2025 10:39:34 -0800 Subject: [PATCH 1/4] LPD-69624 Adds description for list command --- scripts/cli/lec.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cli/lec.sh b/scripts/cli/lec.sh index c88595f..1d459a6 100755 --- a/scripts/cli/lec.sh +++ b/scripts/cli/lec.sh @@ -114,6 +114,7 @@ _printHelpAndExit() { stop Stop a Composer project clean Stop a Composer project and remove Docker volumes exportData Export container data for a Composer project + list List entities of a various types remove Completely tear down and remove one or more Composer projects share [--export] Save a Composer workspace for sharing. The "--export" flag exports the container data before saving the workspace. update [--unstable] Check for updates to Composer and lec. The "--unstable" flag updates to latest master branch. From c02f5d2595826913bdfce29fad5e52aa8ec77544 Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Thu, 13 Nov 2025 10:40:58 -0800 Subject: [PATCH 2/4] LPD-69624 Make command public --- scripts/cli/lec.sh | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/cli/lec.sh b/scripts/cli/lec.sh index 1d459a6..d4aafc5 100755 --- a/scripts/cli/lec.sh +++ b/scripts/cli/lec.sh @@ -625,34 +625,6 @@ _cmd_gw() { ./gradlew "${@}" ) } -_cmd_list() { - local closest_entity - local entity="${1}" - - if [[ -z "${entity}" ]]; then - _print_step "Showing listable entities..." - - _listPrefixedFunctions _list_ - - exit - fi - - if ! _verifyListableEntity "${entity}"; then - closest_entity=$(_listPrefixedFunctions _list_| _fzf --filter "${entity}" | head -n 1) - - if _verifyListableEntity "${closest_entity}" && _confirm "Entity \"${entity}\" is unknown. Use closest entity \"${closest_entity}\" instead?"; then - entity=${closest_entity} - else - _print_error "Cannot list ${C_YELLOW}${entity}${C_NC}. Showing listable entities..." - - _listPrefixedFunctions _list_ - - exit - fi - fi - - _list_"${entity}" -} _cmd_ports() { _checkProjectDirectory @@ -835,6 +807,34 @@ cmd_init() { _startProject "${worktree_dir}" fi } +cmd_list() { + local closest_entity + local entity="${1}" + + if [[ -z "${entity}" ]]; then + _print_step "Showing listable entities..." + + _listPrefixedFunctions _list_ + + exit + fi + + if ! _verifyListableEntity "${entity}"; then + closest_entity=$(_listPrefixedFunctions _list_| _fzf --filter "${entity}" | head -n 1) + + if _verifyListableEntity "${closest_entity}" && _confirm "Entity \"${entity}\" is unknown. Use closest entity \"${closest_entity}\" instead?"; then + entity=${closest_entity} + else + _print_error "Cannot list ${C_YELLOW}${entity}${C_NC}. Showing listable entities..." + + _listPrefixedFunctions _list_ + + exit + fi + fi + + _list_"${entity}" +} cmd_remove() { local worktrees worktrees="$(_listWorktrees | grep -E -v "^${LIFERAY_ENVIRONMENT_COMPOSER_HOME}$" | _selectMultiple "Choose projects to remove (Tab to select multiple)")" From d5e8c49562efd5e891ce5e2d61cd671ce5ec1f3c Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Thu, 13 Nov 2025 10:44:06 -0800 Subject: [PATCH 3/4] LPD-69624 Add lec list to README --- README.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.markdown b/README.markdown index d2afcfb..a229273 100644 --- a/README.markdown +++ b/README.markdown @@ -620,6 +620,13 @@ Completely tear down and remove one or more Composer projects: lec remove # Choose one or more projects to remove ``` +List various entities + +```sh +lec list # Displays entities that can be listed; `lec list ` lists all entries of the selected entity. +lec list releases # Displays all releases. +``` + Jump to a workspace: ```sh From 1d733bc4ab7e94427c3a1b9e8ac212efd6c7d1bb Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Tue, 9 Dec 2025 16:44:29 -0800 Subject: [PATCH 4/4] LPD-69624 Display optional arg in help text for list command --- scripts/cli/lec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli/lec.sh b/scripts/cli/lec.sh index d4aafc5..694a5ce 100755 --- a/scripts/cli/lec.sh +++ b/scripts/cli/lec.sh @@ -114,7 +114,7 @@ _printHelpAndExit() { stop Stop a Composer project clean Stop a Composer project and remove Docker volumes exportData Export container data for a Composer project - list List entities of a various types + list [] List entities of a various types remove Completely tear down and remove one or more Composer projects share [--export] Save a Composer workspace for sharing. The "--export" flag exports the container data before saving the workspace. update [--unstable] Check for updates to Composer and lec. The "--unstable" flag updates to latest master branch.