Welcome, Guest. Please login or register.

Author Topic: color AmigaShell out there?  (Read 3200 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show all replies
color AmigaShell out there?
« on: May 09, 2013, 09:32:08 PM »
I was wondering, as ECS supports 16 colors and AGA supports 256 if there is an AmigaShell version out there that supports multiple colors (for files, and for vim, etc)?  Also, is there a way to do CED colorthemes with more than 4 colors?
 

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show all replies
Re: color AmigaShell out there?
« Reply #1 on: May 10, 2013, 04:43:22 PM »
So, I tried CSH and its a wonderful unixy shell.

I notice that it does use color, although I have no idea where it is defining this color.

Also, The workbench palette preferences widget for "Multicolor" has a whopping 8 colors that can be defined.

Is there support for more than 8 colors in an AmigaOS 3.1 window?
 

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show all replies
Re: color AmigaShell out there?
« Reply #2 on: May 10, 2013, 10:50:27 PM »
Quote from: nyteschayde;734432
The Amiga CLI and Shell support the standard ANSI escape sequences for enabling color. They are limited to the available colors and those colors are taken from the palette as mentioned above.

You can set foreground colors with:

echo "*E[3Xm"

where X is a number from 0 to 7

and background colors with:

echo "*E[4Xm"

where X is a number from 0 to 7

You can also do both on the same line using something like

echo "*E[4X;3Xm"

If you need to reset the styles use

echo "*E[0m"

You can also do other things like bold "*E[1m" and I think the Amiga also supports underline and italics. Those are values in the 2-6 range but I can't remember which one is which.

If you are doing a lot of shell manipulation there are some cool values you can do with these escape sequences. *E[ is the same thing as CSi if you look up these ANSI escape sequences elsewhere.


So...those numbers would correspond I assume to the default workbench pallete...which would be 8 custom colors.  That would mean that my whole workbench colorscheme would change as well...  I was hoping for some sort of .bashrc style file where I could assign colors to things and customize just the CLI window and its associated proggies.

Quote from: SamuraiCrow;734433
Have you looked into ZShell?  It's a bit more Amiga-like than CSH.


I have that one installed as well!  I know its sort of dirty to be CLI happy on an Amiga, but it sure makes things quick... its all that unix blood in me :P
 

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show all replies
Re: color AmigaShell out there?
« Reply #3 on: May 11, 2013, 03:32:43 AM »
Yeah, it would be great fun to figure out how to set a 16 color terminal.