Skip to content

Commit

Permalink
show dir listing instead of contents for tar_file:directory/
Browse files Browse the repository at this point in the history
  • Loading branch information
wofr06 committed Aug 31, 2024
1 parent 3651e17 commit 3188109
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lesspipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ has_colorizer () {
ft=${3##*/}
ft=${ft##*.}
opt=(-c "$1" --cmd "set filetype=$ft")
fi ;;
fi
;;
*)
return ;;
esac
Expand Down Expand Up @@ -655,10 +656,10 @@ isarchive () {
case $prog in
tar|bsdtar)
[[ "$2" =~ ^[a-z_-]*:.* ]] && echo "$2: remote operation tar host:file not allowed" && return
if [[ "$3" =~ --* ]]; then
$prog Oxf "$2" "--" "$3" 2>/dev/null
if [[ "$3" =~ .*/$ ]]; then
$prog Otvf "$2" -- "$3"
else
$prog Oxf "$2" "$3" 2>/dev/null
$prog Oxf "$2" -- "$3" 2>/dev/null
fi
;;
rar|unrar)
Expand Down

0 comments on commit 3188109

Please sign in to comment.