commit bat-extras for openSUSE:Factory
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 2022-07-29 16:47:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bat-extras (Old) and /work/SRC/openSUSE:Factory/.bat-extras.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "bat-extras" Fri Jul 29 16:47:23 2022 rev:2 rq:991605 version:2022.07.27 Changes: -------- --- /work/SRC/openSUSE:Factory/bat-extras/bat-extras.changes 2022-04-11 23:49:46.874702403 +0200 +++ /work/SRC/openSUSE:Factory/.bat-extras.new.1533/bat-extras.changes 2022-07-29 16:47:41.078616978 +0200 @@ -1,0 +2,9 @@ +Thu Jul 28 20:32:10 UTC 2022 - Jan-Luca Kiok <me@jlk.one> + +- Update to release 2022-07-27 + * batdiff: Fix use of deprecated --hunk-style + * batman: Fix error when using fzf to pick manpages + * batgrep: Pass -u flag to ripgrep + + +------------------------------------------------------------------- Old: ---- v2021.08.21.tar.gz New: ---- v2022.07.27.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bat-extras.spec ++++++ --- /var/tmp/diff_new_pack.bpI3mB/_old 2022-07-29 16:47:41.610618457 +0200 +++ /var/tmp/diff_new_pack.bpI3mB/_new 2022-07-29 16:47:41.614618469 +0200 @@ -17,7 +17,7 @@ Name: bat-extras -Version: 2021.08.21 +Version: 2022.07.27 Release: 0 Summary: Extra scripts for bat License: MIT ++++++ v2021.08.21.tar.gz -> v2022.07.27.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/doc/batgrep.md new/bat-extras-2022.07.27/doc/batgrep.md --- old/bat-extras-2021.08.21/doc/batgrep.md 2021-08-22 01:19:17.000000000 +0200 +++ new/bat-extras-2022.07.27/doc/batgrep.md 2022-07-27 22:30:27.000000000 +0200 @@ -31,6 +31,7 @@ | | `--paging=["never"/"always"]`| Enable/disable paging. | | | `--pager=[PAGER]` | Specify the pager to use. | | | `--terminal-width=[COLS]` | Generate output for the specified terminal width. | +| | `--no-separator` | Disable printing separator between files | The following options are passed directly to ripgrep, and are not handled by this script. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/src/batdiff.sh new/bat-extras-2022.07.27/src/batdiff.sh --- old/bat-extras-2021.08.21/src/batdiff.sh 2021-08-22 01:19:17.000000000 +0200 +++ new/bat-extras-2022.07.27/src/batdiff.sh 2022-07-27 22:30:27.000000000 +0200 @@ -77,7 +77,11 @@ # Append arguments for delta/bat. BAT_ARGS+=("--terminal-width=${OPT_TERMINAL_WIDTH}" "--paging=never") -DELTA_ARGS+=("--width=${OPT_TERMINAL_WIDTH}" "--paging=never" "--hunk-style=plain") +DELTA_ARGS+=( + "--width=${OPT_TERMINAL_WIDTH}" + "--paging=never" + "--hunk-header-decoration-style=plain" +) if "$OPT_COLOR"; then BAT_ARGS+=("--color=always") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/src/batgrep.sh new/bat-extras-2022.07.27/src/batgrep.sh --- old/bat-extras-2021.08.21/src/batgrep.sh 2021-08-22 01:19:17.000000000 +0200 +++ new/bat-extras-2022.07.27/src/batgrep.sh 2022-07-27 22:30:27.000000000 +0200 @@ -38,6 +38,7 @@ OPT_HIGHLIGHT=true OPT_SEARCH_PATTERN=false OPT_FIXED_STRINGS=false +OPT_NO_SEPARATOR=false BAT_STYLE="${BAT_STYLE:-header,numbers}" # Set options based on the bat version. @@ -63,11 +64,29 @@ fi # Parse arguments. +shopt -s extglob # Needed to handle -u + +# First handle -u specially - it can be repeated multiple times in a single +# short argument, and repeating it 1, 2, or 3 times causes different effects. +resetargs +SHIFTOPT_SHORT_OPTIONS="PASS" +while shiftopt; do + case "$OPT" in + [-]+(u) ) + RG_ARGS+=("$OPT") + ;; + esac +done resetargs +SHIFTOPT_SHORT_OPTIONS="VALUE" while shiftopt; do case "$OPT" in # ripgrep options + [-]+([u]) ) ;; # Ignore - handled in first loop. + --unrestricted) + RG_ARGS+=("$OPT") + ;; -i | --ignore-case) OPT_CASE_SENSITIVITY="--ignore-case" ;; -s | --case-sensitive) OPT_CASE_SENSITIVITY="--case-sensitive" ;; -S | --smart-case) OPT_CASE_SENSITIVITY="--smart-case" ;; @@ -117,6 +136,7 @@ --no-highlight) OPT_HIGHLIGHT=false ;; -p | --search-pattern) OPT_SEARCH_PATTERN=true ;; --no-search-pattern) OPT_SEARCH_PATTERN=false ;; + --no-separator) OPT_NO_SEPARATOR=true ;; # Option forwarding --rg:*) { @@ -214,6 +234,12 @@ LAST_LH=() LAST_FILE='' READ_FROM_STDIN=false + NO_SEPARATOR="$OPT_NO_SEPARATOR" + + if [[ "$BAT_STYLE" = *grid* ]]; then + NO_SEPARATOR=true + fi + # If we found no files being provided and STDIN to not be attached to a tty, # we capture STDIN to a variable. This variable will later be written to @@ -248,7 +274,7 @@ [[ -z "$LAST_FILE" ]] && return 0 # Print the separator. - if ! [[ "$BAT_STYLE" = *grid* ]]; then + if ! "$NO_SEPARATOR"; then "$FIRST_PRINT" && echo "$SEP" fi FIRST_PRINT=false @@ -263,7 +289,7 @@ "$LAST_FILE" # Print the separator. - if ! [[ "$BAT_STYLE" = *grid* ]]; then + if ! "$NO_SEPARATOR"; then echo "$SEP" fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/src/batman.sh new/bat-extras-2022.07.27/src/batman.sh --- old/bat-extras-2021.08.21/src/batman.sh 2021-08-22 01:19:17.000000000 +0200 +++ new/bat-extras-2022.07.27/src/batman.sh 2022-07-27 22:30:27.000000000 +0200 @@ -61,7 +61,7 @@ # Convert the page(section) format to something that can be fed to the man command. while read -r line; do if [[ "$line" =~ ^(.*)\(([0-9]+)\)$ ]]; then - MAN_ARGS+=("${BASH_REMATCH[2]}" "${BASH_REMATCH[1]}") + MAN_ARGS+=("${BASH_REMATCH[2]}" "$(echo ${BASH_REMATCH[1]} | xargs)") fi done <<< "$selected_page" fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/test/snapshot/batgrep/test_output_without_separator.stdout.snapshot new/bat-extras-2022.07.27/test/snapshot/batgrep/test_output_without_separator.stdout.snapshot --- old/bat-extras-2021.08.21/test/snapshot/batgrep/test_output_without_separator.stdout.snapshot 1970-01-01 01:00:00.000000000 +0100 +++ new/bat-extras-2022.07.27/test/snapshot/batgrep/test_output_without_separator.stdout.snapshot 2022-07-27 22:30:27.000000000 +0200 @@ -0,0 +1,6 @@ + File: [1mfile.txt[0m +[38;5;238m 1[0m [48;5;236;38;5;231mcat[0m[48;5;236m [0m +[38;5;238m 2[0m [38;5;231mdog[0m +[38;5;238m 3[0m [48;5;236;38;5;231mcar[0m[48;5;236m [0m +[38;5;238m 4[0m [38;5;231mfrog[0m +[38;5;238m 5[0m [38;5;231mfox[0m diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/test/suite/batgrep.sh new/bat-extras-2022.07.27/test/suite/batgrep.sh --- old/bat-extras-2021.08.21/test/suite/batgrep.sh 2021-08-22 01:19:17.000000000 +0200 +++ new/bat-extras-2022.07.27/test/suite/batgrep.sh 2022-07-27 22:30:27.000000000 +0200 @@ -114,3 +114,13 @@ BAT_STYLE="grid" batgrep "ca" file.txt --color=always } + +test:output_without_separator() { + description "Snapshot test for output without separator" + snapshot stdout + snapshot stderr + + require_rg + + batgrep "ca" file.txt --no-separator --color=always +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bat-extras-2021.08.21/version.txt new/bat-extras-2022.07.27/version.txt --- old/bat-extras-2021.08.21/version.txt 2021-08-22 01:19:17.000000000 +0200 +++ new/bat-extras-2022.07.27/version.txt 2022-07-27 22:30:27.000000000 +0200 @@ -1 +1 @@ -2021.04.06 +2022.07.27
participants (1)
-
Source-Sync