Fix deprecated 'str downcase' in confirm helper

str downcase/str lowercase differ across nu versions (renamed in
0.114.0); avoid depending on either by checking both cases directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ariandClaude Sonnet 5 committed 2026-09-15 14:17:18 -04:00
1 parent de2649f6e0
commit c39be5e6de
1 file changed
+1 -1
+1 -1
View File
@@ -31,7 +31,7 @@ def ask [prompt: string, default: string = ""] {
def confirm [prompt: string] {
let reply = (input $" ($prompt) [y/N] ")
($reply | str downcase | str starts-with "y")
(($reply | str starts-with "y") or ($reply | str starts-with "Y"))
}
def confirm-word [word: string, prompt: string] {