Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
zless80 linesDownload Raw Back to bin
1#!/bin/sh2 3# Copyright (C) 1998, 2002, 2006-2007, 2010-2025 Free Software Foundation, Inc.4 5# This program is free software; you can redistribute it and/or modify6# it under the terms of the GNU General Public License as published by7# the Free Software Foundation; either version 3 of the License, or8# (at your option) any later version.9 10# This program is distributed in the hope that it will be useful,11# but WITHOUT ANY WARRANTY; without even the implied warranty of12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the13# GNU General Public License for more details.14 15# You should have received a copy of the GNU General Public License16# along with this program.  If not, see <https://www.gnu.org/licenses/>.17 18version="zless (gzip) 1.1419Copyright (C) 2025 Free Software Foundation, Inc.20This is free software.  You may redistribute copies of it under the terms of21the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.22There is NO WARRANTY, to the extent permitted by law.23 24Written by Paul Eggert."25 26usage="Usage: $0 [OPTION]... [FILE]...27Like 'less', but operate on the uncompressed contents of any compressed FILEs.28 29Options are the same as for 'less'.30 31Report bugs to <bug-gzip@gnu.org>."32 33case $1 in34--help)      printf '%s\n' "$usage"   || exit 1; exit;;35--version)   printf '%s\n' "$version" || exit 1; exit;;36esac37 38if test "${LESSMETACHARS+set}" != set; then39  # Work around a bug in less 394 and earlier;40  # it mishandles the metacharacters '$%=~'.41  space=' '42  tab='	'43  newline='44'45  LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'46  export LESSMETACHARS47fi48 49less_version=`less -V 2>/dev/null`50case $less_version in51less' '45[1-9]* | \52less' '4[6-9][0-9]* | \53less' '[5-9][0-9][0-9]* | \54less' '[1-9][0-9][0-9][0-9]*)55   check_exit_status='|';;56*) check_exit_status='';;57esac58case $less_version in59less' '429* | \60less' '4[3-9][0-9]* | \61less' '[5-9][0-9][0-9]* | \62less' '[1-9][0-9][0-9][0-9]*)63   use_input_pipe_on_stdin='-';;64*) use_input_pipe_on_stdin='';;65esac66case $less_version in67less' '623* | \68less' '62[4-9]* | \69less' '6[3-9][0-9]* | \70less' '[7-9][0-9][0-9]* | \71less' '[1-9][0-9][0-9][0-9]*)72   show_preproc_error='--show-preproc-error';;73*) show_preproc_error='';;74esac75 76LESSOPEN="|$check_exit_status${use_input_pipe_on_stdin}gzip -cdfq -- %s"77export LESSOPEN78 79exec less $show_preproc_error "$@"80 
codekingpro/portable-devtools · Team Ai