You are not logged in.

#1 2012-10-04 21:16:42

byronmurg
Member
From: Manchester, UK
Registered: 2012-09-30
Posts: 2

Colour per letter.

Hey guys

I've had this idea of colourizing command options to aide in their memorization. I've been reading through the wiki and various other sites to try to find a way of colouring a single letter on STDOUT or man pages.

Although there are many FAQs on how to create rather impressive aesthetic effects I cannot find one that tells me how to change each instance of just one letter.

For man pages it would be some thing like:

man() {
    env \
        ?????=$(printf "\e[1;31m") \
            man "$@"
}

Please help me Arch. I'm sitting an LPIC-1 in a few weeks and I need to draw on my dominant visual memory to remember all these options.

Offline

#2 2012-10-04 22:29:09

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Colour per letter.

export MANPAGER='bash -c "sed \$'\''s/pacman/\\e[1;31m&\\e[m/g'\'' | less -isXMR"'
man pacman

Offline

#3 2012-10-20 13:36:04

byronmurg
Member
From: Manchester, UK
Registered: 2012-09-30
Posts: 2

Re: Colour per letter.

Thanks Procyon, I'm using your command with sed -f and a list. I still need to play around with it a bit and shall post the final results.

Offline

Board footer

Powered by FluxBB