Skip to content

Commit 04d6b03

Browse files
committed
imporoved test coverage and installation scripts and docker for testing
1 parent 9467f27 commit 04d6b03

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL maintainer="[email protected]"
66

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

autocomplete.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Do not use `set -euo pipefail` or similar because this a
1010
# bash completion script and it will change the behavior of the shell invoking it
1111

12-
export ACSH_VERSION=0.3.5
12+
export ACSH_VERSION=0.4.0
1313

1414
###############################################################################
1515
#
@@ -657,12 +657,26 @@ show_help() {
657657
echo "For more information, visit: https://autocomplete.sh"
658658
}
659659

660+
# Function to check if running in a subshell
661+
is_subshell() {
662+
if [[ "$$" != "$BASHPID" ]]; then
663+
return 0
664+
else
665+
return 1
666+
fi
667+
}
668+
660669
show_config() {
661670
local config_file config_value
662671
local term_width small_table rest
663672

664673
echo_green "Autocomplete.sh - Configuration and Settings - Version $ACSH_VERSION"
665-
if check_if_enabled; then
674+
675+
if is_subshell; then
676+
echo -e " STATUS: \033[33;5mUnknown\033[0m \033[0m"
677+
echo -e " Run \033[33;5msource autocomplete config\033[0m to see if autocomplete is enabled"
678+
return
679+
elif check_if_enabled; then
666680
# echo enabled in green
667681
echo -e " STATUS: \033[32;5mEnabled\033[0m \033[0m"
668682
else

docs/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This install script downloads the latest version of the LLMs
55

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

0 commit comments

Comments
 (0)