File tree Expand file tree Collapse file tree 2 files changed +24
-17
lines changed Expand file tree Collapse file tree 2 files changed +24
-17
lines changed Original file line number Diff line number Diff line change 9
9
# Do not use `set -euo pipefail` or similar because this a
10
10
# bash completion script and it will change the behavior of the shell invoking it
11
11
12
- export ACSH_VERSION=0.3.3
12
+ export ACSH_VERSION=0.3.4
13
13
14
14
# ##############################################################################
15
15
#
@@ -937,21 +937,19 @@ Please follow the install instructions on https://github.com/closedloop-technolo
937
937
echo " Added autocomplete cli autocomplete to $bashrc_file "
938
938
fi
939
939
940
- # $(model_command)
941
-
942
- echo_green " Autocomplete.sh - LLM Powered Bash Completion - Version $ACSH_VERSION - https://autocomplete.sh"
943
- echo -e " \e[1;34mInstall Completed\e[0m"
944
940
echo
945
- echo -e " Please run \e[1;34msource $bashrc_file \e[0m to enable autocomplete"
941
+ echo_green " Autocomplete.sh - LLM Powered Bash Completion - Version $ACSH_VERSION "
942
+ echo -e " \e[1;34mInstall Completed\e[0m"
946
943
echo
947
- echo " Then :"
948
- echo -e " $ \e[1;34mautocomplete model \e[0m \tto select the language model "
949
-
944
+ echo " Two more commands to run steps to complete the installation :"
945
+ echo -e " 1. $ \e[1;34msource $bashrc_file \e[0m to enable autocomplete "
946
+ echo -e " 2. $ \e[1;34mautocomplete model\e[0m \tto select the language model "
950
947
echo
951
948
echo -e " $ \e[1;30mautocomplete config\e[0m \tto view settings"
952
- echo -e " $ \e[1;30mautocomplete --help\e[0m \tto enable autocomplete"
953
-
954
-
949
+ echo -e " $ \e[1;30mautocomplete --help\e[0m \tfor additional commands"
950
+ echo
951
+ echo -e " Visit \e[1;32mhttps://autocomplete.sh\e[0m for examples and more information"
952
+ echo
955
953
}
956
954
957
955
remove_command () {
Original file line number Diff line number Diff line change 4
4
# This install script downloads the latest version of the LLMs
5
5
6
6
# The URL of the latest version of the LLMs
7
- ACSH_VERSION=" 0.3.3 "
7
+ ACSH_VERSION=" 0.3.4 "
8
8
URL=" https://raw.githubusercontent.com/closedloop-technologies/autocomplete-sh/v${ACSH_VERSION} /autocomplete.sh"
9
9
10
10
# The default location to install the LLMs
@@ -29,9 +29,18 @@ if ! command -v jq &> /dev/null; then
29
29
echo " For macOS (using Homebrew): brew install jq"
30
30
fi
31
31
32
- # Check if the _init_completion function exists
32
+ # Source bash-completion if _init_completion function does not exist
33
33
if ! type -t _init_completion & > /dev/null; then
34
- echo " ERROR: Please ensure you have bash-completion installed and sourced."
35
- else
36
- " $INSTALL_LOCATION " install
34
+ # shellcheck disable=SC1091
35
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
36
+ . /usr/share/bash-completion/bash_completion
37
+ elif [ -f /etc/bash_completion ]; then
38
+ . /etc/bash_completion
39
+ else
40
+ echo " ERROR: Please ensure you have bash-completion installed and sourced."
41
+ exit 1
42
+ fi
37
43
fi
44
+
45
+ # Proceed with installation
46
+ " $INSTALL_LOCATION " install
You can’t perform that action at this time.
0 commit comments