<commit_before>#!/usr/bin/env bash

# # # # # # # # # # # # # # # # # # # #
# shows the help
help() {
    # path to local node_modules
    PC_NPM_CONFIG="$WDIR/src/package.json"
    # spaces until the commands descriptions starts
    SPACE="                      "

    printf "${BLUE}pro-cli ${BOLD}v${PC_VERSION}-beta${NORMAL}\n"
    printf "help: project [command]\n\n"
    printf "COMMANDS:\n"
    printf "    ${BLUE}init${NORMAL}${SPACE:4}Setup default project structure in the specified directory.\n"
    printf "    ${BLUE}config${NORMAL}${SPACE:6}Read and write config settings.${NORMAL}\n"
    printf "    ${BLUE}self-update${NORMAL}${SPACE:11}Update pro-cli.\n"
    printf "    ${BLUE}open${NORMAL}${SPACE:4}Open another project.\n"
    printf "    ${BLUE}list${NORMAL}${SPACE:4}List all projects.\n"

    # # # # # # # # # # # # # # # # # # # #
    # show docker commands help if local config file exists
    if [ -f "$WDIR/docker-compose.yml" ]; then
        printf "DOCKER COMMANDS:\n"
        printf "    ${BLUE}start${NORMAL}${SPACE:5}Start the specified service. ${YELLOW}Created containers expected.${NORMAL}\n"
        printf "    ${BLUE}stop${NORMAL}${SPACE:4}Stop all or just the specified service.\n"
        printf "    ${BLUE}up${NORMAL}${SPACE:2}Start all docker containers and application.\n"
        printf "    ${BLUE}down${NORMAL}${SPACE:4}Stop and remove all docker containers.\n"
        printf "    ${BLUE}compose${NORMAL}${SPACE:7}Run docker-compose commands.\n"
        printf "    ${BLUE}logs${NORMAL}${SPACE:4}Show logs of all or the specified service.\n"
        printf "    ${BLUE}status${NORMAL}${SPACE:6}List all service containers and show their status.\n"
        printf "    ${BLUE}top${NORMAL}${SPACE:3}Display a live stream of container(s) resource usage statistics.\n"
    fi

    # # # # # # # # # # # # # # # # # # # #
    # show PHP commands if the current project is of type laravel or PHP
    if [[ -f $PC_CONF && ( $PC_TYPE == "laravel" || $PC_TYPE == "php" )]]; then
        printf "PHP COMMANDS:\n"
        printf "    ${BLUE}composer${NORMAL}${SPACE:8}Run composer commands.\n"
        printf "    ${BLUE}test${NORMAL}${SPACE:4}Run Unit Tests.\n"
    fi

    # # # # # # # # # # # # # # # # # # # #<commit_msg>commands alphabetically ordered<commit_after>#!/usr/bin/env bash

# # # # # # # # # # # # # # # # # # # #
# shows the help
help() {
    # path to local node_modules
    PC_NPM_CONFIG="$WDIR/src/package.json"
    # spaces until the commands descriptions starts
    SPACE="                      "

    printf "${BLUE}pro-cli ${BOLD}v${PC_VERSION}-beta${NORMAL}\n"
    printf "help: project [command]\n\n"
    printf "COMMANDS:\n"
    printf "    ${BLUE}config${NORMAL}${SPACE:6}Read and write config settings.${NORMAL}\n"
    printf "    ${BLUE}init${NORMAL}${SPACE:4}Setup default project structure in the specified directory.\n"
    printf "    ${BLUE}list${NORMAL}${SPACE:4}List all projects.\n"
    printf "    ${BLUE}open${NORMAL}${SPACE:4}Open another project.\n"
    printf "    ${BLUE}self-update${NORMAL}${SPACE:11}Update pro-cli.\n"

    # # # # # # # # # # # # # # # # # # # #
    # show docker commands help if local config file exists
    if [ -f "$WDIR/docker-compose.yml" ]; then
        printf "DOCKER COMMANDS:\n"
        printf "    ${BLUE}compose${NORMAL}${SPACE:7}Run docker-compose commands.\n"
        printf "    ${BLUE}down${NORMAL}${SPACE:4}Stop and remove all docker containers.\n"
        printf "    ${BLUE}logs${NORMAL}${SPACE:4}Show logs of all or the specified service.\n"
        printf "    ${BLUE}start${NORMAL}${SPACE:5}Start the specified service. ${YELLOW}Created containers expected.${NORMAL}\n"
        printf "    ${BLUE}status${NORMAL}${SPACE:6}List all service containers and show their status.\n"
        printf "    ${BLUE}stop${NORMAL}${SPACE:4}Stop all or just the specified service.\n"
        printf "    ${BLUE}top${NORMAL}${SPACE:3}Display a live stream of container(s) resource usage statistics.\n"
        printf "    ${BLUE}up${NORMAL}${SPACE:2}Start all docker containers and application.\n"
    fi

    # # # # # # # # # # # # # # # # # # # #
    # show PHP commands if the current project is of type laravel or PHP
    if [[ -f $PC_CONF && ( $PC_TYPE == "laravel" || $PC_TYPE == "php" )]]; then
        printf "PHP COMMANDS:\n"
        printf "    ${BLUE}composer${NORMAL}${SPACE:8}Run composer commands.\n"
        printf "    ${BLUE}test${NORMAL}${SPACE:4}Run Unit Tests.\n"
    fi

    # # # # # # # # # # # # # # # # # # # #
{'fraction_non_alphanumeric': 0.1759788825340959, 'fraction_numerical': 0.007039155301363837, 'mean_word_length': 2.9164513350559864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2298917', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1538, 'n_words': 332}