summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-08-11 19:37:00 +0200
committerFlorian Pritz <bluewind@xssn.at>2009-08-11 19:37:00 +0200
commiteeb46899eb59385f7084ef1dbc6a562823d9c931 (patch)
treee6cd8f72cfe285c7c156f7f453b95a199f575dad
parent1d3d4e965f33128d6011c7b907f76784784c6b7f (diff)
downloadbin-eeb46899eb59385f7084ef1dbc6a562823d9c931.tar.gz
bin-eeb46899eb59385f7084ef1dbc6a562823d9c931.tar.xz
make vimpager remove colorcodes
-rwxr-xr-xvimpager7
1 files changed, 4 insertions, 3 deletions
diff --git a/vimpager b/vimpager
index caf7772..edaa5db 100755
--- a/vimpager
+++ b/vimpager
@@ -58,9 +58,9 @@ if do_ps | grep -q '\(py\(thon\|doc\)\|man\|perl\(doc\)\?\([0-9.]*\)\?\)\>'; the
proc=$$
while next_parent=`ppid $proc` && [ $next_parent != 1 ]; do
if pproc $next_parent | grep -q 'man\>'; then
- cat $file | sed -e 's/\[[^m]*m//g' | sed -e 's/.//g' | less_vim -c 'set ft=man' -; exit
+ cat $file | sed -e 's/\[[^m]*m//g; s/.//g' | less_vim -c 'set ft=man' -; exit
elif pproc $next_parent | grep -q 'py\(thon\|doc\)\>'; then
- cat $file | sed -e 's/\[[^m]*m//g' | sed -e 's/.//g' | less_vim -c 'set ft=man' -; exit
+ cat $file | sed -e 's/\[[^m]*m//g; s/.//g' | less_vim -c 'set ft=man' -; exit
elif pproc $next_parent | grep -q 'perl\(doc\)\?\([0-9.]*\)\?\>'; then
cat $file | sed -e 's/.//g' | less_vim -c 'set ft=man' -; exit
fi
@@ -68,7 +68,8 @@ if do_ps | grep -q '\(py\(thon\|doc\)\|man\|perl\(doc\)\?\([0-9.]*\)\?\)\>'; the
done
fi
-less_vim "$file"
+cat $file | sed -e 's/\[[^m]*m//g; s/.//g' | less_vim -; exit
+#less_vim "$file"
# CONTRIBUTORS:
#