Manjaro-Pek / pacli

A simple and interative Bash Frontend for Pacman/Yaourt/Pacaur
GNU General Public License v2.0
44 stars 8 forks source link

Help page not formatted correctly with option 10 #19

Closed Chrysostomus closed 8 years ago

Chrysostomus commented 8 years ago

Choosing number+h prints help for that item correctly, but choosing 10 for help prints raw color codes around titles instead of coloring the output.

papajoker commented 8 years ago

after fetch and merge this master branch no problem with 9h 10h "10 h" "10 -h" "10+h" or 11h, at home, titles are bold ...

a section must start with the characters \ or !! directly followed by the number and one character space the regex :

/[\*\*?\!\!]${id} /
Chrysostomus commented 8 years ago

I don't have any problem with those either, they work as they should. Problem arises if I choose just "10" and press enter. I suspect it because the help page is piped into less.

Chrysostomus commented 8 years ago

I tried removing the pipe to less and adding read after the help_text function. That displays info properly.

Is there some way to make this work with less, or should we just cat it?

papajoker commented 8 years ago

ok i have same problem with jwm ! just change the first line of help_text() and add -R

local id="${1:-0}" command="less -R"

ps: me i have LESS = -R in env ;) Perhaps an environment variable to add to the iso Manjaro because it seems normal that less can interpret the colors ?

Note with jvm pacli is unusable because the console default color is orange with BG red 13..18 :-1:

Chrysostomus commented 8 years ago

Tried the solution, worked right, implemented it. Thanks