Skip to content

Commit

Permalink
prepare for version 2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
wofr06 committed Nov 10, 2024
1 parent 07a1aac commit 735327d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
****************************************************************************
# ChangeLog for lesspipe.sh #
****************************************************************************
Version 2.16 Nov 10 2024
- security fix: check file name if used with ar
- add --ansi to mdcat (fixes #48)
- improved recognition of appimage files
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# lesspipe.sh, a preprocessor for less

Version: 2.15
Version: 2.16
Author : Wolfgang Friebel [wp.friebel@gmail.com](mailto://wp.friebel@gmail.com)
License: GPL

Expand Down Expand Up @@ -127,6 +127,8 @@ the author by email.
eval "$(lesspipe.sh)" # (bash) or
lesspipe.sh | source /dev/stdin # (zsh)
```
Several Linux distributions do now set **LESSOPEN** by default and if the contents of the variable is not referring to this lesspipe.sh version, it has to be redefined to get the functionality described here.

As `lesspipe.sh` is accepting only a single argument, a hierarchical list of file
names has to be separated by a non-blank character. A colon is rarely found
in file names, therefore it has been chosen as the separator character. If a
Expand Down
12 changes: 11 additions & 1 deletion lesscomplete
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# lesscomplete, a helper script for the _less completion script
# synced with lesspipe 2.15
# synced with lesspipe 2.16
# Author: Wolfgang Friebel (wp.friebel AT gmail.com)

has_cmd () {
Expand Down Expand Up @@ -229,6 +229,11 @@ get_unpack_cmd () {
{ has_cmd 7za && prog=7za; } ;;
esac
fi
if [[ "$prog" = ar && "$2" = *@* ]]; then
t=$(nexttmp)
cat "$2" > "$t"
set "$2" "$t"
fi
[[ -n $prog ]] && cmd=(isarchive "$prog" "$2" "$file2")
if [[ -n ${cmd[*]} ]]; then
[[ -n "$file2" ]] && file2= && return
Expand Down Expand Up @@ -333,6 +338,11 @@ isdeb () {
bsdtar xOf "$1" "$data" | bsdtar xOf - "$2"
fi
else
if [[ "$1" = *@* ]]; then
t=$(nexttmp)
cat "$1" > "$t"
set "$1" "$t"
fi
data=$(ar t "$1"|grep data)
ft=$(ar p "$1" "$data" | filetype -)
get_unpack_cmd "$ft" -
Expand Down
2 changes: 1 addition & 1 deletion lesspipe.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# lesspipe.sh, a preprocessor for less
lesspipe_version=2.15
lesspipe_version=2.16
# Author: Wolfgang Friebel (wp.friebel AT gmail.com)

has_cmd () {
Expand Down
2 changes: 2 additions & 0 deletions packaging/lesspipe.spec
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ cd $RPM_BUILD_DIR
%docdir %{prefix}/share/man/man1

%changelog
* Sun Nov 10 2024 2.16-1 - wp.friebel@gmail.com
- file name checks for ar
* Thu Oct 03 2024 2.15-1 - wp.friebel@gmail.com
- display all certificates in pem files
* Fri Aug 16 2024 2.14-1 - wp.friebel@gmail.com
Expand Down

0 comments on commit 735327d

Please sign in to comment.