From 5240532e36ad71379ad0d4dedb08f4421928de52 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 28 Sep 2007 23:56:41 +0100 Subject: defaults & configuration of suggested manpage generating/viewing tool/display --- lib/sisu/v0/sysenv.rb | 6 ++++++ lib/sisu/v0/urls.rb | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index 58ad1bf8..8bf805be 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -1596,6 +1596,12 @@ WOK else 'oowriter' #'odf-viewer','oowriter' end end + def manpage_generator + if defined? @rc['program_select']['man'] and @rc['program_select']['man'] =~/\S\S+/ + @rc['program_select']['man'] + else 'nroff -man' #'nroff -man' #'groff -man -Tascii' + end + end def file_encoding #file encoding is='' if defined? @rc['program_set']['file_encoding']; is=@rc['program_set']['encoding'] diff --git a/lib/sisu/v0/urls.rb b/lib/sisu/v0/urls.rb index 5d5d8795..7f087b95 100644 --- a/lib/sisu/v0/urls.rb +++ b/lib/sisu/v0/urls.rb @@ -95,6 +95,7 @@ module SiSU_urls @console_browser=@env.program.console_web_browser @pdf_viewer=@env.program.pdf_viewer @odf_viewer=@env.program.odf_viewer + @manpage_gen=@env.program.manpage_generator source=if @opt.fns =~/\.sst$/; @opt.fns elsif @opt.fns =~/\._sst/; "#@fnb.composite.sst" else 'not recognised file' @@ -206,7 +207,7 @@ module SiSU_urls @opt.cmd.gsub!(/d[iu]/,'') end if x=~/^i/ and @opt.cmd =~/i/ - tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","nroff -man #{@path.path.manpage}/#@fnb.1 |most") + tell=SiSU_Screen::Ansi.new(@opt.cmd,"-#{x}","#@manpage_gen #{@path.path.manpage}/#@fnb.1 |most") tell.result unless @opt.cmd =~/q/ @opt.cmd.gsub!(/I/,'') end -- cgit v1.2.3