<commit_before>#!/usr/bin/env bash
##############################################################################
# @file cli.bash
# @date January, 2016
# @author <NAME> <<EMAIL>>
# @copyright Copyright (c) GROG [https://grog.be] 2016, All Rights Reserved
# @license MIT
##############################################################################

load msg "$TPM_SRC" # Use tmux aware msg functions
load log "$TPM_SRC" # Use updated log functions
load tpm "$TPM_SRC"
load tmux "$TPM_SRC"

##############################################################################

# prints usage for ellipsis-tpm
cli.usage() {
msg.print "\
Usage: ellipsis-tpm <command>
  Options:
    -h, --help     show help
    -v, --version  show version

  Commands:
    install    install new plugin
    update     update installed plugin
    clean      cleanup plugins"
}

##############################################################################

# prints ellipsis-tpm version
cli.version() {
    local cwd="$(pwd)"
    cd $TPM_PATH

    local sha1=$(git rev-parse --short HEAD)
    msg.print "\033[1mv$TPM_VERSION\033[0m ($sha1)"

    cd $cwd
}

##############################################################################

# run ellipsis-tpm
cli.run() {
    case "$1" in
        tmux)
            tmux.or_fail
            TPM_TMUX_ECHO=1

            cli.run "${@:2}"

            tmux.echo "Finished, you can now exit copy mode! (Enter/ESC)"
            ;;
        run)
            tpm.run
            ;;
        install|in)
            tpm.install "${@:2}"
            ;;
        update|up)
            tpm.update "${@:2}"
            ;;
        clean)
            tpm.clean
            ;;<commit_msg>Add tmux chek for `ellipsis-tpm run`<commit_after>#!/usr/bin/env bash
##############################################################################
# @file cli.bash
# @date January, 2016
# @author <NAME> <<EMAIL>>
# @copyright Copyright (c) GROG [https://grog.be] 2016, All Rights Reserved
# @license MIT
##############################################################################

load msg "$TPM_SRC" # Use tmux aware msg functions
load log "$TPM_SRC" # Use updated log functions
load tpm "$TPM_SRC"
load tmux "$TPM_SRC"

##############################################################################

# prints usage for ellipsis-tpm
cli.usage() {
msg.print "\
Usage: ellipsis-tpm <command>
  Options:
    -h, --help     show help
    -v, --version  show version

  Commands:
    install    install new plugin
    update     update installed plugin
    clean      cleanup plugins"
}

##############################################################################

# prints ellipsis-tpm version
cli.version() {
    local cwd="$(pwd)"
    cd $TPM_PATH

    local sha1=$(git rev-parse --short HEAD)
    msg.print "\033[1mv$TPM_VERSION\033[0m ($sha1)"

    cd $cwd
}

##############################################################################

# run ellipsis-tpm
cli.run() {
    case "$1" in
        tmux)
            tmux.or_fail
            TPM_TMUX_ECHO=1

            cli.run "${@:2}"

            tmux.echo "Finished, you can now exit copy mode! (Enter/ESC)"
            ;;
        run)
            tmux.or_fail
            tpm.run
            ;;
        install|in)
            tpm.install "${@:2}"
            ;;
        update|up)
            tpm.update "${@:2}"
            ;;
        clean)
            tpm.clean
            ;;
{'fraction_non_alphanumeric': 0.3265424912689173, 'fraction_numerical': 0.01338766006984866, 'mean_word_length': 2.6996770721205596, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1943129', 'n_tokens_mistral': 1045, 'n_tokens_neox': 954, 'n_words': 246}