Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show only replies by TheBilgeRat
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 matt3k

Re: color AmigaShell out there?
« Reply #1 on: May 09, 2013, 09:36:02 PM »
Think CSH allowed more colors.  Been quite a few years since I used it though.

http://aminet.net/package/util/shell/csh550a

Check it out, it's a great shell!
 

Offline carls

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1047
    • Show only replies by carls
Re: color AmigaShell out there?
« Reply #2 on: May 09, 2013, 10:00:45 PM »
The bog standard Shell from Commodore actually has support for colours, although what colour you get depends on your Workbench palette. You can use escape codes to set the foreground and background pens and a lot of other stuff, too (don't remember them now so don't ask me :). There are several commands supporting this, at least one port of "ls" does different colours for directories.
However, if you want to run stuff like vim with correct colouring, I guess you need something that can do proper terminal emulation. The only one I know of for Amiga is ViNCEd but there might be others.
Amiga: Too weird to live, too rare to die.
 

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show only replies by TheBilgeRat
Re: color AmigaShell out there?
« Reply #3 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 matt3k

Re: color AmigaShell out there?
« Reply #4 on: May 10, 2013, 06:07:57 PM »
My 3000D is waiting a CPU, once I get it all going again (a few weeks or so) I will test out CSH and see what it can do.

It was my favorite shell back in the day.  The shortcuts saved a ton of typing and the type complete was the best imho.  Remember it by default used custom colors when you turned it on.  Not sure how many pens you can set, it might be buried in the docs somewhere.

Good luck!
 

Offline nyteschayde

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 643
    • Show only replies by nyteschayde
    • http://www.nyteshade.com
Re: color AmigaShell out there?
« Reply #5 on: May 10, 2013, 07:34:49 PM »
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.
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2281
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: color AmigaShell out there?
« Reply #6 on: May 10, 2013, 07:58:28 PM »
Have you looked into ZShell?  It's a bit more Amiga-like than CSH.
 

Offline TheBilgeRatTopic starter

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show only replies by TheBilgeRat
Re: color AmigaShell out there?
« Reply #7 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 only replies by TheBilgeRat
Re: color AmigaShell out there?
« Reply #8 on: May 11, 2013, 03:32:43 AM »
Yeah, it would be great fun to figure out how to set a 16 color terminal.
 

Offline nyteschayde

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 643
    • Show only replies by nyteschayde
    • http://www.nyteshade.com
Re: color AmigaShell out there?
« Reply #9 on: May 11, 2013, 06:59:27 AM »
Here is a screen shot showing 30-37 and 90-97. 90-97 are supposed to bright versions of 30-37. This is running in VINCEd.

Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline carls

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1047
    • Show only replies by carls
Re: color AmigaShell out there?
« Reply #10 on: May 17, 2013, 08:58:17 AM »
Quote from: nyteschayde;734513
Here is a screen shot showing 30-37 and 90-97. 90-97 are supposed to bright versions of 30-37. This is running in VINCEd.


Also note that unless you use a tool to lock specific numbered pens in the Workbench palette, these are subject to change. When needed, Workbench will allocate "unused" colours for displaying images etc.
Amiga: Too weird to live, too rare to die.