Skip to content

Commit 90168c9

Browse files
committed
🔧 (Dockerfile): add vim to the list of installed packages for convenience
🔧 (Dockerfile): update bash-completion sourcing in .bashrc for better compatibility ⬆️ (autocomplete.sh, install.sh): bump ACSH_VERSION from 0.3.2 to 0.3.3 ♻️ (install.sh): use type -t instead of command -v for checking _init_completion function
1 parent 3a17f3c commit 90168c9

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ LABEL maintainer="sean@closedloop.tech"
66

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

1313
# Add bash-completion sourcing to .bashrc
14-
# RUN echo 'if [ -f /etc/bash_completion ]; then\n . /etc/bash_completion\nfi' >> /root/.bashrc
15-
16-
# Copy the autocomplete script to /usr/local/bin
17-
# COPY ./docs/install.sh install.sh
14+
RUN echo "\nif [ -f /etc/bash_completion ] && ! shopt -oq posix; then\n . /etc/bash_completion\nfi" >> /root/.bashrc
1815

1916
# Set the default command to bash
2017
CMD ["bash"]

autocomplete.sh

Lines changed: 1 addition & 1 deletion
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.2
12+
export ACSH_VERSION=0.3.3
1313

1414
###############################################################################
1515
#

docs/install.sh

Lines changed: 2 additions & 2 deletions
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="0.3.2"
7+
ACSH_VERSION="0.3.3"
88
URL="https://raw.githubusercontent.com/closedloop-technologies/autocomplete-sh/v${ACSH_VERSION}/autocomplete.sh"
99

1010
# The default location to install the LLMs
@@ -30,7 +30,7 @@ if ! command -v jq &> /dev/null; then
3030
fi
3131

3232
# Check if the _init_completion function exists
33-
if ! command -v _init_completion &> /dev/null; then
33+
if ! type -t _init_completion &> /dev/null; then
3434
echo "ERROR: Please ensure you have bash-completion installed and sourced."
3535
else
3636
"$INSTALL_LOCATION" install

0 commit comments

Comments
 (0)