From f30ff13961d4489c38ccab227e3be3d699afdc02 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 18 Sep 2025 14:28:25 +0200 Subject: [PATCH] Fix yq with -r --- modules/cli/zsh/init.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/cli/zsh/init.zsh b/modules/cli/zsh/init.zsh index f2c1288..893d538 100644 --- a/modules/cli/zsh/init.zsh +++ b/modules/cli/zsh/init.zsh @@ -91,7 +91,11 @@ proxy() { # keep yq's output in yaml & colorizes it yq() { - command yq -Y "$@" | bat -ppl yaml + # if `-r` is in the arguments, do not add the -Y flag because it breaks yq. + if ! (( $argv[(I)-r] )); then + argv+=(-Y) + fi + command yq "${argv[@]}" | bat -ppl yaml } kgy() {