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 10:32:27 +01:00
parent 7632722faa
commit 275e698720

View File

@@ -513,8 +513,9 @@ show_config() {
}
set_config() {
local key="$1" value="$2" config_file="$HOME/.finish/config"
local key="$1" value="$2" config_file="$HOME/.finish/config" lowercase_key
key=$(echo "$key" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
lowercase_key=$(echo "$key" | tr '[:upper:]' '[:lower:]')
key=$(echo "$key" | tr '[:lower:]' '[:upper:]' | sed 's/[^A-Z0-9]/_/g')
if [ -z "$key" ]; then
echo_error "SyntaxError: expected 'finish config set <key> <value>'"
@@ -524,7 +525,7 @@ set_config() {
echo_error "Configuration file not found: $config_file. Run finish install."
return
fi
sed -i "s|^\($key:\).*|\1 $value|" "$config_file"
sed -i "s|^\($lowercase_key:\).*|\1 $value|" "$config_file"
acsh_load_config
}