refactor: group apply prompts with explanations

Replace ~25 individual y/n prompts with 6 logical groups, each showing
a table of pending changes with one-line explanations before prompting.
Also fix FIDO2 middleware detection (needs brew openssh, not just libfido2).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Flo
2026-03-31 15:30:00 +02:00
parent 8037cb7908
commit 09f6369bec
2 changed files with 136 additions and 66 deletions

View File

@@ -370,11 +370,12 @@ SSHEOF
# Apply: git config settings (-y mode)
# ===========================================================================
@test "-y mode applies git config settings" {
@test "-y mode applies setting group" {
source_functions
AUTO_YES=true
run apply_git_setting "transfer.fsckObjects" "true"
run apply_setting_group "Test Group" "Test description" \
"transfer.fsckObjects" "true" "Verify objects on transfer"
assert_success
local result
@@ -382,16 +383,17 @@ SSHEOF
[ "$result" = "true" ]
}
@test "apply skips already-correct setting" {
@test "apply_setting_group skips already-correct settings" {
git config --global transfer.fsckObjects true
source_functions
AUTO_YES=true
run apply_git_setting "transfer.fsckObjects" "true"
run apply_setting_group "Test Group" "Test description" \
"transfer.fsckObjects" "true" "Verify objects on transfer"
assert_success
# Should produce no output (no "Set" message)
refute_output --partial "Set"
# No changes needed — group should not print "Applied"
refute_output --partial "Applied"
}
# ===========================================================================