--- configure.orig 2005-05-18 11:52:40 -0500 +++ configure 2005-08-30 16:10:35 -0500 @@ -5,7 +5,7 @@ # do a clean up if we get a CTRL-C $SIG{INT} = sub { unlink "lesspipe.sh.tmp"; print "\n"; exit 1 }; -use vars qw($opt_help $opt_prefix $opt_yes $opt_default $opt_ask $opt_nomake +use vars qw($opt_help $opt_prefix $opt_yes $opt_default $opt_ask $opt_syntax $opt_nomake $opt_shell $ifsyntax %have %rep $recursion); # the above line will use any perl that is in your PATH. You might want to @@ -13,8 +13,8 @@ use Getopt::Long; Getopt::Long::Configure("prefix_pattern=--"); -my $result = GetOptions qw(help+ prefix=s shell=s yes+ default+ ask+ nomake+); -### still missing: check proper version of tar, cpio, gzip, bzip2 +my $result = GetOptions qw(help+ prefix=s shell=s yes+ default+ ask+ syntax+ nomake+); +### still missing: check proper version of tar, cpio, gzip, bzip1 if ( $ARGV[0] or ! $result or $opt_help) { print << 'EOF'; Usage: configure [options] @@ -25,6 +25,7 @@ --default do not ask questions, try to guess correct answer --yes like --default but assume ´yes´ to all questions --shell= specify full path to an alternative shell to use + --syntax enable syntax highlighting --nomake do not generate a Makefile Directory and file names: --prefix=PREFIX install lesspipe.sh in PREFIX/bin (/usr/local) @@ -84,6 +85,9 @@ my $shell = check_shell_vers(); # ask if syntax highlighting should be included $ifsyntax = ''; +if ($opt_syntax) { + $ifsyntax = 'y'; +} else { if ($opt_yes) { $ifsyntax = 'y'; } elsif ($opt_default) { @@ -97,7 +101,7 @@ $ifsyntax ||= 'n'; } } - +} while () { s/^/#/ if /^setopt / and $shell ne 'zsh'; if (/set -A cmd / and $shell ne 'ksh') {