test shell question

Posted: 01-06-2006, 12:59 PM
does anyone know if theres a shell out there that uses ncurses that i could
config as I like, to run/handel programs or other items in a shell? I've
tried midnight commander and didn't care for it.

======================================
1. xxxxxxxxxx 5. xxxxxxxxxx
2. xxxxxxxxxx 6. xxxxxxxxx
3.xxxxxxxxxxxx 7xxxxxxxxx
4.xxxxxxxxxxxxxx 8xxxxxxxx

Command____________________
=====================================

that's kind of what I am looking for the X's can be command to run programs
or get into the man/help files
I'm not a programer but but to get this I'm willing to try.

Thanks for any help
key


Reply With Quote

Responses to "test shell question"

Chris F.A. Johnson
Guest
Posts: n/a
 
Re: test shell question
Posted: 01-06-2006, 05:10 PM
On 2006-01-06, <keyman8@sbcglobal.net> wrote:
> does anyone know if theres a shell out there that uses ncurses that i could
> config as I like, to run/handel programs or other items in a shell? I've
> tried midnight commander and didn't care for it.
There is no ncurses shell interface, but you can roll your own.

The vast majority of terminals use the ISO-6429 standard (formerly
ANSI x3.64) codes, so you can code a library of routines using
this, and replace it with libraries for other terminals when
necessary.
> ======================================
> 1. xxxxxxxxxx 5. xxxxxxxxxx
> 2. xxxxxxxxxx 6. xxxxxxxxx
> 3.xxxxxxxxxxxx 7xxxxxxxxx
> 4.xxxxxxxxxxxxxx 8xxxxxxxx
>
> Command____________________
> =====================================
>
> that's kind of what I am looking for the X's can be command to run programs
> or get into the man/help files
The full library is in my book, or may be downloaded from the
Apress website. See my .sig for URL.

Here's a sample:

NL=$'\n'
ESC=$'\e'
CSI=${ESC}[
bar=============================================== =========================

printat()
{
printf "$CSI%d;%dH%s" "$1" "$2" "$3"
}

menu()
{
numitems=$#
rows=$(( $numitems / 2 + $numitems % 2 ))
row=0
itemnum=1
col=3
baserow=3
clear
printat 1 1 "$bar"
for item
do
printat $(( $baserow + $row )) $col
printf "%2d. %s" "$itemnum" "$item"
itemnum=$(( $itemnum + 1 ))
row=$(( $row + 1 ))
if [ $row -eq $rows ]
then
row=0
col=$(( $col + 20 ))
fi
done
printat $(( $baserow + $rows + 3 )) 1 "$bar"
}

while :
do
menu qwe rztxyc uvibon asd fgh jkl zxc vbn a1s2d qweqweqw sdf sdrt EXIT
printat $(( $baserow + $rows + 2 )) 1 " Command: "
read num
[ $num -eq $numitems ] && break
: do whatever with user input
done
echo

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Reply With Quote
Guest
Posts: n/a
 
Re: test shell question
Posted: 01-07-2006, 12:11 PM
Thanks Chirs, I'll give it a shot and look your web page over. I hope I can
make it work I'll try to keep you up to date on it...lol

Many Thanks

key

"Chris F.A. Johnson" <cfajohnson@gmail.com> wrote in message
news:etk293-g3m.ln1@rogers.com...
> On 2006-01-06, <keyman8@sbcglobal.net> wrote:
> > does anyone know if theres a shell out there that uses ncurses that i
could
> > config as I like, to run/handel programs or other items in a shell? I've
> > tried midnight commander and didn't care for it.
>
> There is no ncurses shell interface, but you can roll your own.
>
> The vast majority of terminals use the ISO-6429 standard (formerly
> ANSI x3.64) codes, so you can code a library of routines using
> this, and replace it with libraries for other terminals when
> necessary.
>
> > ======================================
> > 1. xxxxxxxxxx 5. xxxxxxxxxx
> > 2. xxxxxxxxxx 6. xxxxxxxxx
> > 3.xxxxxxxxxxxx 7xxxxxxxxx
> > 4.xxxxxxxxxxxxxx 8xxxxxxxx
> >
> > Command____________________
> > =====================================
> >
> > that's kind of what I am looking for the X's can be command to run
programs
> > or get into the man/help files
>
> The full library is in my book, or may be downloaded from the
> Apress website. See my .sig for URL.
>
> Here's a sample:
>
> NL=$'\n'
> ESC=$'\e'
> CSI=${ESC}[
>
bar=============================================== =========================
>
> printat()
> {
> printf "$CSI%d;%dH%s" "$1" "$2" "$3"
> }
>
> menu()
> {
> numitems=$#
> rows=$(( $numitems / 2 + $numitems % 2 ))
> row=0
> itemnum=1
> col=3
> baserow=3
> clear
> printat 1 1 "$bar"
> for item
> do
> printat $(( $baserow + $row )) $col
> printf "%2d. %s" "$itemnum" "$item"
> itemnum=$(( $itemnum + 1 ))
> row=$(( $row + 1 ))
> if [ $row -eq $rows ]
> then
> row=0
> col=$(( $col + 20 ))
> fi
> done
> printat $(( $baserow + $rows + 3 )) 1 "$bar"
> }
>
> while :
> do
> menu qwe rztxyc uvibon asd fgh jkl zxc vbn a1s2d qweqweqw sdf sdrt EXIT
> printat $(( $baserow + $rows + 2 )) 1 " Command: "
> read num
> [ $num -eq $numitems ] && break
> : do whatever with user input
> done
> echo
>
> --
> Chris F.A. Johnson <http://cfaj.freeshell.org>
> ================================================== =================
> Author:
> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Shell or Exploror based shell ecoulson Windows XP Embedded 2 02-17-2006 06:37 PM
Windows Shell Library (Shell.dll) on XP Home Jeff Windows XP Accessibility 1 07-05-2004 02:02 AM
EWF Custom Shell no installer -> updating the shell in the field Mick Windows XP Embedded 12 03-03-2004 09:02 AM
The shell was stopped and then restarted. By default, the shell is explorer.exe Russell Windows XP Help & Support 1 02-05-2004 08:30 AM
Shell Protoype Component question Steve Worcester Windows XP Embedded 0 01-13-2004 08:24 PM