typo fix
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
Tests / test (bash) (push) Has been cancelled
Tests / test (zsh) (push) Has been cancelled
Tests / lint (push) Has been cancelled
Tests / docker (push) Has been cancelled

This commit is contained in:
2025-12-02 09:10:02 +01:00
parent 24d36cbad4
commit 08b76124e2
9 changed files with 79 additions and 79 deletions

View File

@@ -520,7 +520,7 @@ set_config() {
return
fi
if [ ! -f "$config_file" ]; then
echo_error "Configuration file not found: $config_file. Run finishte install."
echo_error "Configuration file not found: $config_file. Run finish install."
return
fi
sed -i "s|^\($key:\).*|\1 $value|" "$config_file"
@@ -538,7 +538,7 @@ config_command() {
local key="$3" value="$4"
echo "Setting configuration key '$key' to '$value'"
set_config "$key" "$value"
echo_green "Configuration updated. Run 'finishte config' to view changes."
echo_green "Configuration updated. Run 'finish0 config' to view changes."
return
fi
if [[ "$command" == "reset" ]]; then
@@ -547,7 +547,7 @@ config_command() {
build_config
return
fi
echo_error "SyntaxError: expected 'finishte config set <key> <value>' or 'finishte config reset'"
echo_error "SyntaxError: expected 'finish config set <key> <value>' or 'finish config reset'"
}
build_config() {
@@ -610,13 +610,13 @@ acsh_load_config() {
}
install_command() {
local bashrc_file="$HOME/.bashrc" finishte_setup="source finishte enable" finishte_cli_setup="complete -F _finishtesh_cli finishte"
if ! command -v finishte &>/dev/null; then
local bashrc_file="$HOME/.bashrc" finishte_setup="source finish enable" finishte_cli_setup="complete -F _finishtesh_cli finishte"
if ! command -v finish &>/dev/null; then
echo_error "finishte.sh not in PATH. Follow install instructions at https://git.appmodel.nl/Tour/finish"
return
fi
if [[ ! -d "$HOME/.finishte" ]]; then
echo "Creating ~/.finishte directory"
echo "Creating ~/.finish directory"
mkdir -p "$HOME/.finishte"
fi
local cache_dir=${ACSH_CACHE_DIR:-"$HOME/.finishte/cache"}
@@ -635,12 +635,12 @@ install_command() {
if ! grep -qF "$finishte_cli_setup" "$bashrc_file"; then
echo -e "# finishte.sh CLI" >> "$bashrc_file"
echo -e "$finishte_cli_setup\n" >> "$bashrc_file"
echo "Added finishte CLI completion to $bashrc_file"
echo "Added finish CLI completion to $bashrc_file"
fi
echo
echo_green "finishte.sh - Version $ACSH_VERSION installation complete."
echo -e "Run: source $bashrc_file to enable finishte."
echo -e "Then run: finishte model to select a language model."
echo -e "Then run: finish model to select a language model."
}
remove_command() {
@@ -654,11 +654,11 @@ remove_command() {
rmdir "$HOME/.finishte"
echo "Removed: $HOME/.finishte"
else
echo "Skipped removing $HOME/.finishte (not empty)"
echo "Skipped removing $HOME/.finish (not empty)"
fi
fi
if [ -f "$bashrc_file" ]; then
if grep -qF "source finishte enable" "$bashrc_file"; then
if grep -qF "source finish enable" "$bashrc_file"; then
sed -i '/# finishte.sh/d' "$bashrc_file"
sed -i '/finishte/d' "$bashrc_file"
echo "Removed finishte.sh setup from $bashrc_file"
@@ -667,12 +667,12 @@ remove_command() {
local finishte_script
finishte_script=$(command -v finishte)
if [ -n "$finishte_script" ]; then
echo "finishte script is at: $finishte_script"
echo "finish script is at: $finishte_script"
if [ "$1" == "-y" ]; then
rm "$finishte_script"
echo "Removed: $finishte_script"
else
read -r -p "Remove the finishte script? (y/n): " confirm
read -r -p "Remove the finish script? (y/n): " confirm
if [[ $confirm == "y" ]]; then
rm "$finishte_script"
echo "Removed: $finishte_script"
@@ -795,7 +795,7 @@ usage_command() {
echo -e "\tTotal Cost:\t\e[31m\$$(printf "%.4f" "$api_cost")\e[0m"
echo
echo -n "Cache Size: $cache_size of ${ACSH_CACHE_SIZE:-10} in "; echo -e "\e[90m$cache_dir\e[0m"
echo "To clear log and cache, run: finishte clear"
echo "To clear log and cache, run: finish clear"
}
###############################################################################
@@ -903,12 +903,12 @@ model_command() {
echo -e "Endpoint:\t\e[90m$ACSH_ENDPOINT\e[0m"
if [[ ${ACSH_PROVIDER^^} == "OLLAMA" || ${ACSH_PROVIDER^^} == "LMSTUDIO" ]]; then
echo "To set a custom endpoint:"
echo -e "\t\e[34mfinishte config set endpoint <your-url>\e[0m"
echo -e "\t\e[34mfinish config set endpoint <your-url>\e[0m"
echo "Other models can be set with:"
echo -e "\t\e[34mfinishte config set model <model-name>\e[0m"
echo -e "\t\e[34mfinish config set model <model-name>\e[0m"
fi
echo "To change temperature:"
echo -e "\t\e[90mfinishte config set temperature <temperature>\e[0m"
echo -e "\t\e[90mfinish config set temperature <temperature>\e[0m"
echo
}
@@ -952,7 +952,7 @@ case "$1" in
;;
*)
if [[ -n "$1" ]]; then
echo_error "Unknown command $1 - run 'finishte --help' for usage or visit https://finishte.sh"
echo_error "Unknown command $1 - run 'finish --help' for usage or visit https://finishte.sh"
else
echo_green "finishte.sh - LLM Powered Bash Completion - Version $ACSH_VERSION - https://finishte.sh"
fi