From 49aa56f959374467a16fc6a3d6ca0e99854771be Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Fri, 18 Apr 2025 15:15:06 -0400 Subject: [PATCH] AutoYADM commit: 2025-04-18 15:15:06 --- .config/fish/conf.d/smartcd.fish | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/fish/conf.d/smartcd.fish b/.config/fish/conf.d/smartcd.fish index f91c6e87..3121c42d 100644 --- a/.config/fish/conf.d/smartcd.fish +++ b/.config/fish/conf.d/smartcd.fish @@ -34,7 +34,17 @@ function cd --wraps=cd --description "Change directory. No args goes to git root __cd_orig - else set -l prompt "This would take you to $dirprev[-1], which is outside $root, are you sure? (y/n): " - echo $prompt + while read --nchars 1 -l response --prompt-str="$prompt" or return 1 + switch $response + case y Y + __cd_orig - + break + case n N + break + case '*' + continue + end + end end end end