Skip to content

Commit

Permalink
imporoved test coverage and installation scripts and docker for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
closedLoop committed Jul 22, 2024
1 parent 9467f27 commit 04d6b03
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL maintainer="sean@closedloop.tech"

# Update the package list and install wget and bash
RUN apt-get update && \
apt-get install -y bash curl wget jq bash-completion vim bats && \
apt-get install -y bash curl wget jq bc bash-completion vim bats && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
18 changes: 16 additions & 2 deletions autocomplete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Do not use `set -euo pipefail` or similar because this a
# bash completion script and it will change the behavior of the shell invoking it

export ACSH_VERSION=0.3.5
export ACSH_VERSION=0.4.0

###############################################################################
#
Expand Down Expand Up @@ -657,12 +657,26 @@ show_help() {
echo "For more information, visit: https://autocomplete.sh"
}

# Function to check if running in a subshell
is_subshell() {
if [[ "$$" != "$BASHPID" ]]; then
return 0
else
return 1
fi
}

show_config() {
local config_file config_value
local term_width small_table rest

echo_green "Autocomplete.sh - Configuration and Settings - Version $ACSH_VERSION"
if check_if_enabled; then

if is_subshell; then
echo -e " STATUS: \033[33;5mUnknown\033[0m \033[0m"
echo -e " Run \033[33;5msource autocomplete config\033[0m to see if autocomplete is enabled"
return
elif check_if_enabled; then
# echo enabled in green
echo -e " STATUS: \033[32;5mEnabled\033[0m \033[0m"
else
Expand Down
2 changes: 1 addition & 1 deletion docs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This install script downloads the latest version of the LLMs

# The URL of the latest version of the LLMs
ACSH_VERSION="v0.3.4"
ACSH_VERSION="v0.4.0"
BRANCH_OR_VERSION=${1:-$ACSH_VERSION}
URL="https://raw.githubusercontent.com/closedloop-technologies/autocomplete-sh/${BRANCH_OR_VERSION}/autocomplete.sh"

Expand Down

0 comments on commit 04d6b03

Please sign in to comment.