mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Fix yq with -r
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user