Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bat-extras for openSUSE:Factory 
checked in at 2024-08-26 22:10:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bat-extras (Old)
 and      /work/SRC/openSUSE:Factory/.bat-extras.new.2698 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bat-extras"

Mon Aug 26 22:10:03 2024 rev:8 rq:1195900 version:2024.08.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/bat-extras/bat-extras.changes    2024-08-13 
13:25:06.166893131 +0200
+++ /work/SRC/openSUSE:Factory/.bat-extras.new.2698/bat-extras.changes  
2024-08-26 22:13:10.445392759 +0200
@@ -1,0 +2,10 @@
+Sun Aug 25 11:14:24 UTC 2024 - Jan-Luca Kiok <opensuse-packa...@jlk.one>
+
+- Update to version 2024.08.24
+  * prettybat: Use yq for YAML and JSON pretty formatting
+  * batdiff: Support filenames with special characters
+  * batman: Fix issues with trailing whitespace in MANPAGER
+  * batman: Fix selecting manpages with aliases
+  * batman: Allow --wrap to be passed to bat
+
+-------------------------------------------------------------------

Old:
----
  v2024.07.10.tar.gz

New:
----
  v2024.08.24.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bat-extras.spec ++++++
--- /var/tmp/diff_new_pack.yYzzTl/_old  2024-08-26 22:13:10.929412969 +0200
+++ /var/tmp/diff_new_pack.yYzzTl/_new  2024-08-26 22:13:10.933413137 +0200
@@ -19,7 +19,7 @@
 %define testsuite_version 6b97e0a531f77d2e1f10f48ebb68d4033d69e04d
 
 Name:           bat-extras
-Version:        2024.07.10
+Version:        2024.08.24
 Release:        0
 Summary:        Extra scripts for bat
 License:        MIT

++++++ v2024.07.10.tar.gz -> v2024.08.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bat-extras-2024.07.10/doc/prettybat.md 
new/bat-extras-2024.08.24/doc/prettybat.md
--- old/bat-extras-2024.07.10/doc/prettybat.md  2024-06-10 21:56:58.000000000 
+0200
+++ new/bat-extras-2024.08.24/doc/prettybat.md  2024-08-24 23:25:19.000000000 
+0200
@@ -21,23 +21,23 @@
 
 ## Languages
 
-| Language             | Formatter                                             
          |
-| -------------------- | 
--------------------------------------------------------------- |
-| JavaScript (JS, JSX) | [prettier](https://prettier.io/)                      
          |
-| TypeScript (TS, TSX) | [prettier](https://prettier.io/)                      
          |
-| CSS, SCSS, SASS      | [prettier](https://prettier.io/)                      
          |
-| Markdown             | [prettier](https://prettier.io/)                      
          |
-| JSON                 | [prettier](https://prettier.io/)                      
          |
-| YAML                 | [prettier](https://prettier.io/)                      
          |
-| HTML                 | [prettier](https://prettier.io/)                      
          |
-| SVG                  | [prettier](https://prettier.io/)                      
          |
-| Rust                 | [rustfmt](https://github.com/rust-lang/rustfmt)       
          |
-| Bash                 | [shfmt](https://github.com/mvdan/sh)                  
          |
-| C                    | 
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)     |
-| C++                  | 
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)     |
-| Objective-C          | 
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)     |
-| Python               | [black](https://black.readthedocs.io/)                
          |
-| Elixir               | [mix 
format](https://hexdocs.pm/mix/main/Mix.Tasks.Format.html) |
+| Language             | Formatter                                             
                                                 |
+| -------------------- | 
------------------------------------------------------------------------------------------------------
 |
+| JavaScript (JS, JSX) | [prettier](https://prettier.io/)                      
                                                 |
+| TypeScript (TS, TSX) | [prettier](https://prettier.io/)                      
                                                 |
+| CSS, SCSS, SASS      | [prettier](https://prettier.io/)                      
                                                 |
+| Markdown             | [prettier](https://prettier.io/)                      
                                                 |
+| JSON                 | [yq](https://mikefarah.gitbook.io/yq), 
[prettier](https://prettier.io/)                                |
+| YAML                 | [yq](https://mikefarah.gitbook.io/yq), 
[prettier](https://prettier.io/)                                |
+| HTML                 | [prettier](https://prettier.io/)                      
                                                 |
+| SVG                  | [prettier](https://prettier.io/)                      
                                                 |
+| Rust                 | [rustfmt](https://github.com/rust-lang/rustfmt)       
                                                 |
+| Bash                 | [shfmt](https://github.com/mvdan/sh)                  
                                                 |
+| C                    | 
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)                     
                       |
+| C++                  | 
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)                     
                       |
+| Objective-C          | 
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html)                     
                       |
+| Python               | [black](https://black.readthedocs.io/)                
                                                 |
+| Elixir               | [mix 
format](https://hexdocs.pm/mix/main/Mix.Tasks.Format.html)                      
                  |
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bat-extras-2024.07.10/src/batdiff.sh 
new/bat-extras-2024.08.24/src/batdiff.sh
--- old/bat-extras-2024.07.10/src/batdiff.sh    2024-06-10 21:56:58.000000000 
+0200
+++ new/bat-extras-2024.08.24/src/batdiff.sh    2024-08-24 23:25:19.000000000 
+0200
@@ -155,8 +155,8 @@
 
        # Diff git file.
        if "$SUPPORTS_BAT_DIFF"; then
-               "$EXECUTABLE_GIT" diff "${GIT_ARGS[@]}" --name-only 
"${files[0]}" \
-                       | xargs "$EXECUTABLE_BAT" --diff 
--diff-context="$OPT_CONTEXT" "${BAT_ARGS[@]}"
+               "$EXECUTABLE_GIT" diff "${GIT_ARGS[@]}" --name-only -z 
"${files[0]}" \
+                       | xargs --null "$EXECUTABLE_BAT" --diff 
--diff-context="$OPT_CONTEXT" "${BAT_ARGS[@]}"
        else
                "$EXECUTABLE_GIT" diff "${GIT_ARGS[@]}" "${files[0]}" | 
"$EXECUTABLE_BAT" --language=diff - "${BAT_ARGS[@]}"
        fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bat-extras-2024.07.10/src/batman.sh 
new/bat-extras-2024.08.24/src/batman.sh
--- old/bat-extras-2024.07.10/src/batman.sh     2024-06-10 21:56:58.000000000 
+0200
+++ new/bat-extras-2024.08.24/src/batman.sh     2024-08-24 23:25:19.000000000 
+0200
@@ -28,7 +28,7 @@
 while shiftopt; do
        case "$OPT" in
                --export-env) OPT_EXPORT_ENV=true ;;
-               --paging|--pager) shiftval; 
FORWARDED_ARGS+=("${OPT}=${OPT_VAL}");
+               --paging|--pager|--wrap) shiftval; 
FORWARDED_ARGS+=("${OPT}=${OPT_VAL}");
                                            BAT_ARGS+=("${OPT}=${OPT_VAL}") ;;
                *)                          MAN_ARGS+=("$OPT") ;;
        esac
@@ -68,6 +68,7 @@
 # -----------------------------------------------------------------------------
 if [[ -n "${MANPAGER}" ]]; then BAT_PAGER="$MANPAGER"; fi
 export MANPAGER="env BATMAN_IS_BEING_MANPAGER=yes bash $(printf "%q " "$SELF" 
"${FORWARDED_ARGS[@]}")"
+export MANPAGER="${MANPAGER%"${MANPAGER##*[![:space:]]}"}"
 export MANROFFOPT='-c'
 
 # If `--export-env`, print exports to use batman as the manpager directly.
@@ -81,24 +82,32 @@
 # If no argument is provided and fzf is installed, use fzf to search for man 
pages.
 if [[ "${#MAN_ARGS[@]}" -eq 0 ]] && [[ -z "$BATMAN_LEVEL" ]] && command -v 
"$EXECUTABLE_FZF" &>/dev/null; then
        export BATMAN_LEVEL=1
-       
+
        selected_page="$(man -k . | "$EXECUTABLE_FZF" --delimiter=" - " 
--reverse -e --preview="
                echo {1} \
                | sed 's/, /\n/g;' \
                | sed 's/\([^(]*\)(\([0-9A-Za-z ]\))/\2\t\1/g' \
                | BAT_STYLE=plain xargs -n2 batman --color=always --paging=never
        ")"
-       
+
        if [[ -z "$selected_page" ]]; then
                exit 0
        fi
-       
+
+       # Some entries from `man -k .` may include "synonyms" of a man page's 
title.
+       # For example, the manual for kubectl-edit will appear as:
+       #
+       #   kubectl-edit(1), kubectl edit(1) - Edit a resource on the server
+       #
+       # `man` only needs one name/title, so we're taking the first one here.
+       selected_page_unaliased="$(echo "$selected_page" | cut -d, -f1)"
+
        # Convert the page(section) format to something that can be fed to the 
man command.
        while read -r line; do
                if [[ "$line" =~ ^(.*)\(([0-9a-zA-Z ]+)\) ]]; then
                        MAN_ARGS+=("${BASH_REMATCH[2]}" "$(echo 
${BASH_REMATCH[1]} | xargs)")
                fi
-       done <<< "$selected_page"       
+       done <<< "$selected_page_unaliased"
 fi
 
 # Run man.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bat-extras-2024.07.10/src/prettybat.sh 
new/bat-extras-2024.08.24/src/prettybat.sh
--- old/bat-extras-2024.07.10/src/prettybat.sh  2024-06-10 21:56:58.000000000 
+0200
+++ new/bat-extras-2024.08.24/src/prettybat.sh  2024-08-24 23:25:19.000000000 
+0200
@@ -24,7 +24,7 @@
 # -----------------------------------------------------------------------------
 
 FORMATTERS=(
-       "prettier" "rustfmt" "shfmt" "clangformat"
+       "yq" "prettier" "rustfmt" "shfmt" "clangformat"
        "black" "mix_format" "column"
 )
 
@@ -171,6 +171,47 @@
        { { "$needs_newline" && sed 's/$/\n/'; } || cat; } | column "${args[@]}"
 }
 
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+formatter_yq_supports__version_ok() {
+       local yq_version
+       yq_version=$(yq --version | sed 's/^.* version v//')
+
+       # If it's older than yq version 4, replace the functions to save 
processing.
+       if version_compare "$yq_version" -lt 4.0; then
+               formatter_yq_supports() { return 1; }
+               formatter_yq_supports__version_ok() { return 1; }
+               return 1
+       fi
+
+       # It's supported.
+       formatter_yq_supports__version_ok() { return 0; }
+       return 0
+}
+
+formatter_yq_supports() {
+       case "$1" in
+               .yaml | yml | \
+               .json)
+               formatter_yq_supports__version_ok
+               return $?
+               ;;
+       esac
+
+       return 1
+}
+
+formatter_yq_process() {
+       local args=()
+       case "$1" in
+               *.json) args+=(--output-format json) ;;
+       esac
+
+       yq --prettyPrint --indent 4 "${args[@]}" \
+               | sed -e ':l' -e 's/^\(\t*\)    /\1\t/g; t l'
+       return $?
+}
+
 # -----------------------------------------------------------------------------
 # Functions:
 # -----------------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bat-extras-2024.07.10/test/shimexec/less 
new/bat-extras-2024.08.24/test/shimexec/less
--- old/bat-extras-2024.07.10/test/shimexec/less        2024-06-10 
21:56:58.000000000 +0200
+++ new/bat-extras-2024.08.24/test/shimexec/less        2024-08-24 
23:25:19.000000000 +0200
@@ -12,4 +12,10 @@
 exit 0
 fi
 
-cat "$1"
+FILES=()
+while [[ $# -gt 0 ]]; do
+    -*) : ;;
+    *)  FILES+=("$1")
+done
+
+cat "${FILES[@]}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bat-extras-2024.07.10/version.txt 
new/bat-extras-2024.08.24/version.txt
--- old/bat-extras-2024.07.10/version.txt       2024-06-10 21:56:58.000000000 
+0200
+++ new/bat-extras-2024.08.24/version.txt       2024-08-24 23:25:19.000000000 
+0200
@@ -1 +1 @@
-2024.07.10
+2024.08.24

Reply via email to