[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

742.0. "Shell 2.07M Available" by CGOU01::DREW (Steve Drew) Thu Sep 24 1987 15:24

    
    Hot of the press, fixes quite a few minor bugs and adds a few
    new features. Executable is only 200 bytes bigger.
    
    Location
    	CGFSV2::DISK$73G:[DREW.AMIGA.SHELL207M]
    			DOCS.ARC	! readme and shell.doc
    			SOURCE.ARC	! all the sources
    			Shell_Amiga.	! vms style version type,delete,rename
			Shell_Unix.	! unix style version cat,rm,mv

    Pls wait a few days before posting to any BBS's just in case
    some one spots any last minute bugs.
        
    Steve Drew.
T.RTitleUserPersonal
Name
DateLines
742.1Z::TENNYDave Tenny | DTN 225-6089Thu Sep 24 1987 16:3217
What's a quick synopsis of the new/modified features?

Also, while I'm thinking of it, here's my wish list for the shell:

  Observe FILENOTE's on files and report them in a regular DIR listing.

  Provide a shell-internal FILENOTE capability.

  Report the archive bits.

  How about a command which we can assign to a key, and which essentially
  implements "shrink to icon" ability for the shell window.



Dave
742.2Quick SummaryCGOU01::DREWSteve DrewFri Sep 25 1987 00:3773
    re: .1

    Mostly bug fixes in this version, but a few new features as listed
    below. The shrink to icon is a good idea, I'll look into it.


    NEW FEATURES:

	- cleaned up documentation.

        - Added support for forward goto's under script files.

	- _prompt can now include escape sequences and still
	  handle editing and recall ok. eg: set _prompt ^[[33m$" "^[[0m

	- dir displays archive bit if set, (file is archived).

	- allow more than one input variable. eg. input a b c
	  eg. 'type file | input line1 line2 line3 line4' get 1st 4 lines.

	- Under dir -s directories are shown in red.

	- if -f switch added to test if file exists.
	  eg. if -f file.ext ; echo file exists; else; echo not there;endif

	- changed function keys to insert text rather than replacing it.
	  You now have the option of a <CR> terminated function key.
	  eg. 'set f1 dir' or 'set f1 dir^M'

	FIXED BUGS:

	- fixed bug with pending aliases and foreach command, that 
	  caused problems with files that contained spaces.

	- if $something ;run prog; endif - bug fixed
	  before if would always be true if run cmd

	- fixed bugs with aliases that used variables for external cmds.

	- added clearerr in main.c to prevent false quiting.

	- dir of files with corrupt dates that caused Guru's bug 
	  fixed.

	- fixed last_err handling when _except varible set.

	- ^J now eqiv to ^M

	- '>>' append will now create the redir file if it does
 	  not already exist.

	- redirection prevented against commands that recall command 
	  parser (recursive): source,foreach,.
	  This prevents files not getting closed properly.
	       eg: forever echo >ram:a foo   --- ok
	       forever >ram:a echo foo       --- not allowed since
	                                         redirecting forever cmd.
	- fix trashing of low mem locations, when redirecting stdin
	  on external commands.

	- Truncated cmd to 40 chars when calling fexecv with path
	  unknown to prevent crashes.

	- Added error type "Error in command name" for command
	  names longer than 100chars (like CLI does).

	- many changes to execom.c for better argument handling
	  from variables.


Steve.
    
742.3Sorry, this topic doesn't belong here.Z::TENNYDave Tenny - VAX LISP DevelopmentMon Sep 28 1987 01:3023
One more thing for the wishlist.
This is, unfortunately, one of the things I really miss on my amiga.
The equivalent of vms/uis F5 for window switching.

Usually I run microGNUemacs and a Shell window concurrently.
And I always end up reaching for the mouse to recompile things, etc.

Ideally, an input handler like SUNMOUSE or POPCLI would be nice,
and it would create this functionality for me.
Alternatively, half the battle could be achieved by indivitual programs
like Shell providing a "cycle forward" or "cycle backward" functionality.

Naturally, the former is exponentially more useful than the latter;
and I don't really care if the functionality appeared in Shell.
I just need a place to air this thought.

Perhaps new topics for Amiga software/hardward/interface are needed.

Does anyone else feel this way?  Am I missing a crucial keyboard
short-cut for window cycling?

Dave
742.4Tried CONMAN?ROZETT::SANTIAGOSliding dwn the razorblade of lifeMon Sep 28 1987 12:331
    
742.5Z::TENNYDave Tenny - VAX LISP DevelopmentMon Sep 28 1987 12:366
re .4
Does CONMAN allow window switching???
Shell already provides all the command-line editing I need.
(thanks Steve!)

Dave
742.6ROZETT::SANTIAGOSliding dwn the razorblade of lifeMon Sep 28 1987 12:4516
    CONMAN bindings:
    
    F9 - toggle windows
    F10- toggle screens
    F1 - shrink window to min size (~icon)
    F2 - expand window to max size 
    
    At least I think that's what they are - I've been using CONMAN
    for ~1 week and haven't used those particular functions that much.
    I'll upload V1.0 tonight if you like.
    
    FWIW the only reason I got CONMAN was because I have a coloured
    prompt in Steve/Matt's Shell and it didn't like that - now that
    2.07 will handle it I'll download that and say bye-bye to CONMAN.
    
    .E
742.7Z::TENNYDave Tenny - VAX LISP DevelopmentMon Sep 28 1987 13:533
Please upload if it is not too much trouble.
Thanks,
  Dave
742.8Yow!ROZETT::SANTIAGOSliding dwn the razorblade of lifeTue Sep 29 1987 00:158
    Done. Look at ROZETT::AMIGA:CONMAN.ARC
    
    I also forgot to mention one thing ConMan does which is worth
    its weight in Polysorbate-80:
    
       ***>> It handles XON/XOFF the way Odin meant them to work! <<***
    
    Yes, you may now type control-S, and control-Q will unpause!
742.9Z::TENNYDave Tenny - VAX LISP DevelopmentTue Sep 29 1987 12:234
Actually, I've always LIKED the way the Amiga allows you
to suspend output and resume it.  Thanks for uploading,
I'll try it tonight.
Dave
742.10Am I missing something?16BITS::KRUGERWed Sep 30 1987 20:464
    What's wrong with holding down the right mouse button or right
    Amiga/shift?
    
    dov
742.11ROZETT::SANTIAGOHappy Birthday to meWed Sep 30 1987 20:5715
    Right Amiga/ALT to be precise.
    
    When you do that, you can't just leave the output suspended and
    switch to another window/screen to do other stuff. 
    
    Besides, ^S/^Q is the way the Lord God meant for man to do it.
    It's the way it's always been, and the way it should ever be.
    Matter of fact, I think it should be introduced into everyday
    conversation: when somebody goes to fast, you say "XOFF!".
    
    On the less flippant side: It's a more standard interface. I
    really really dislike having to remember what the PRINT command
    is called this week and on this system. So if I can go from 
    TOPS to UN*X to VMS to AmigaDOS without having to undergo a
    complete mental reboot, I'll be a very happy person.
742.12BAGELS::BRANNONDave BrannonWed Sep 30 1987 21:178
    sounds like all you need is an AmigaDOS shell for TOPS, Unix,
    and VMS :-)
    
    I've renamed a number of my VMS commands to a mix of TOPS-10,
    MS-DOS, and AmigaDOS.  Now if i could convince TPU/EDT
    that ^B means delete a line... 
    
    -dave
742.13This conversation is confusingZ::TENNYDave Tenny - VAX LISP DevelopmentWed Sep 30 1987 22:4118
re: .10

Somehow things appear to have been mismumbled.

I wanted ways to cycle windows.  Left-amiga N/M will allow you to cycle screens,
sort of (sometimes you can't go through all screens with this mechanism).
But there is no keyboard way to cycle windows without using the keystrokes
which will move the mouse, and select the window you want.

re: .10/11/12

You don't need to use right-amiga alt (equivalent of hitting the menu button)
to halt screen output.  The effect of a ^s in a amigados window is to simply
type any printing character, or a space.  So I just hit space.
To effect a ^Q for the above, simply backspace to the margin, or hit return.
I'm not trying to insult your intelligence, but it sounded like maybe you
didn't know this ???
742.14ROZETT::SANTIAGOSlidin dwn the razorblade of lifeThu Oct 01 1987 15:4512
    My intelligence can't be insulted: It ain't smart enough.
    
    Yes I did know this, space and backspace was what I gradually
    wound up using on the Amiga. However, the ^S instinct is still
    very much ingrained in me and every so often I'd hit ^S, then
    ^Q to get it back, then remember I was on an Amiga and have
    to hit 2 backspaces. Man is a creature of habit. I am a man.
    Therefore by Modus Ponendo Ponens I am a creature of habit. QED.
    It's nice when you don't have to rethink all your actions 
    depending on what system you're using. 
    
    Anywho, enough of this: Did you get ConMan to work for you?
742.15Z::TENNYDave Tenny - VAX LISP DevelopmentThu Oct 01 1987 16:3618
I haven't tried CONMAN yet, but I read the docs last night.
The PUSH/QUEUE/DROPBUF stuff is right out of IBM CMS land.
It works great in a one console environment, but I don't know how well
(useful) the stuff will be on the Amiga.  Nice idea though.

Question:
  How does CONMAN get along with Drew's version of SHELL.
  If I use CONMAN in default mode, I would guess that SHELL opens
  a raw window and there is no conflict.  Yes, no?

Unfortunately, the docs seem to indicate that the window cycling functionality
I want aren't there.  You can move the currently selected window
from front to back, etc.  But it doesn't switch the keyboard.

I guess I'll know all this for sure when I try it, but I'm not that far yet.

Dave
742.16Comments on V.2.07VENERE::ZABOTMarco Zabot-Adv.Tech.mgr-Turin ACTThu Oct 08 1987 08:4262
Using shell207m
---------------
General Comment.
	I just moved from P.Higginbottom shell to Steve Drew one.
	I like it a lot. But here are some things I'd like to be added
	modified.
1 - Very important. ( may be a bug ??)
	Remove the WB disk. Type  'Date' ( Case IS important ). You'll get
		Command Not Found Date
	The _path is ram:,ram:c,c:,df1:c/,df0:c/
	Assign is correct ( C:   WB:C )
	If the disk is not found on line the command is rejected. It would be 
	nice to have a request for mounting the floppy.
2 - Important.
	Piping. Possibly I'm mising something.
	Try :
		Dir | xx
	where xx.sh file is:
		
		label l1
		input a
		if $a <> ""
		echo $a
		goto l1
		endif

	The listing may be stoppend only with ^C
	It means NO empty line at the end of piped stream. Which is the EOF
	signal ?
	Then I tried:
	
		label l1
		input a
		if $p = $a ; goto fine ; endif
		echo $a
		set p $a
		goto l1
		label fine
	Now it stops , but in both cases ( this and the previous one )
        the temp files pipe*.* in ram: are OBJECT in USE. After a few
        tries you'll get 
    
		Redirection error     (&%^% ????)
    
	The files may stay open due to GOTO within if/endif.
	Any suggestion?

3 - Whish list.

a) pr command. Would be nice to have something that print an ascii file with
	a minimum of formatting , such as : file name, page # and page lenght
	control
b) more/less command. I know that a scoll may be stopped easily on Amiga, but
	I'd like a lot more something that stop automatically at end of page
	and can even step back, search etc.. Anyone has the source of LESS ?
c) what about some calcualtion capability on variables? Something simple such 
	as + - * / would be usefull. I had some trouble in finding a solution
	to add 9 to a variable.
    

To sum up: Thank you Steve, you did a great job !
marco
742.17ROZETT::SANTIAGOSlidin dwn the razorblade of lifeThu Oct 08 1987 10:3521
    
< Note 742.16 by VENERE::ZABOT "Marco Zabot-Adv.Tech.mgr-Turin ACT" >

    >	If the disk is not found on line the command is rejected. It would be 
    >	nice to have a request for mounting the floppy.
    uh-uh!!! That's one of my favourite *features* of Shell! How many
    times have you typed "mroe" and had a requester come up and say
    "Please insert Workbench in any drive", then you have to hit Am-B
    to cancel the bloody thing? Of course I now have "mroe" aliased
    to "more", but that's beside the point :-). Thing is, I don't
    like them requesters. If I see "command not found", I have the
    option of fixing my typo (if it is one) or, if it is a valid
    command, inserting WB and hitting uparrow-return.
    
>b) more/less command. I know that a scoll may be stopped easily on Amiga, but
>	I'd like a lot more something that stop automatically at end of page
>	and can even step back, search etc.. Anyone has the source of LESS
    Look in the 1.2 tools disk. 

    .E
742.18Ugh, no requestors please!Z::TENNYDave Tenny - VAX LISP DevelopmentThu Oct 08 1987 12:0917
re: .16

I agree with .17, no requesters for workbench disks.
If a tool isn't in the path you specified, too bad.

Also, when I want more functionality, I simply ask for it.
For a command like MORE, whether or not the command is internal is
invisible to the user, provided that MORE is in your search path.
This is not always true of other AmigaDOS commands requiring quoted
strings, or DOS wildcards.  To use these commands from the shell, 
appropriate capitalization and escape chars
are required, thus arguing for internalization of the command (if it's small).

A builtin program like LESS could add too much to the shell executable
size, requiring longer load times, etc.  

Dave
742.19Consider having a miniA500 ..VENERE::ZABOTMarco Zabot-Adv.Tech.mgr-Turin ACTThu Oct 08 1987 14:1115
	I don't want to start a fight , but ...
    
    re .17 .18 - ( Requestor )
    	
	Yes, I consider it a feature also ON THE A2000 with 4 drives and
	a hard-disk. But on a mini A500 ( 1 drive ) sometime you NEED to
	swap floppies ( think of executing source files aving as a destination
	of df0: and not having enough memory to keep all the command in RAM:.

	In this case I consider it a bug, 'cause there is no way to accomplish
	the task.

	BTW, are there around many mini-systems ( 512k, one floppy)??
	Otherwise we can forget about it !
	marco
742.20AUTHOR::MACDONALDWA1OMM Listening 224.28Thu Oct 08 1987 14:529
    I haven't been able to get this command sequence to work on the
    Shell:
    
    RUN WAIT UNTIL 23:00+
    COPY FILE.TXT TO PRT:
    
    It works okay from CLI but not SHELL. Any thoughts?
    
    Paul
742.21It's a featureEVER11::EKLOFWe're everywhere.Thu Oct 08 1987 15:367
Re:.19

	Sorry, but I've got a 512K A1000 with only one drive, and I consider
it a feature rather than a bug.

Mark

742.22Yes No ok MaybeCGFSV2::DREWSteve DrewThu Oct 08 1987 18:2576
    Now to try and make everyone happy :-)
    
    RE. 20
    
    an easy one:
    	
    	run command_one +^J^J command_two
     
      or my favorite:
    
    alias make "run ChangeTaskPri -5 +^J^J make" 
    
    RE: .16

Prompting for disks:
            
If you do want to be prompted to insert the disk then include the path
name in the command line eg:  C:Date or WB:C/Date. Or alias the command
such as  alias Date "WB:C/Date".  Otherwise shell will not ask for any
volumes to be mounted. (This is the way I intentionally wrote it and
the way most people seem to like it.)


-> 2 - Important.
-> 	Piping. Possibly I'm mising something.
-> 	Try :
-> 		Dir | xx
-> 	where xx.sh file is:
-> 		
-> 		label l1
-> 		input a
-> 		if $a <> ""
-> 		echo $a
-> 		goto l1
-> 		endif
-> 
-> 	The listing may be stoppend only with ^C
-> 	It means NO empty line at the end of piped stream. Which is the EOF
-> 	signal ?

    I'll check on this. But I don't think it will work piping to a source
    file.
    What actually are you trying to do here?? Maybe theres a better way?
    

-> 3 - Whish list.
-> 
-> a) pr command. Would be nice to have something that print an ascii file with
-> 	a minimum of formatting , such as : file name, page # and page lenght
-> 	control

Sorry, but there's too many other utilities that already do this to warruant
taking up more code in shell.
I always try to keep the code as tight as possible with only commands that
are really needed.

-> b) more/less command. I know that a scoll may be stopped easily on Amiga, but
-> 	I'd like a lot more something that stop automatically at end of page
-> 	and can even step back, search etc.. Anyone has the source of LESS ?

This maybe could be added with a small amount of code. But for scanning
text files, nothing beats Blitz. Anyway I'll think about it.


-> c) what about some calcualtion capability on variables? Something simple such 
-> 	as + - * / would be usefull. I had some trouble in finding a solution
-> 	to add 9 to a variable.

Use 'inc a 9' 

Sorry just realized thats missing from the docs. You can do a

	inc var n
or      dec var n

/Steve Drew.
742.23I was trying to ..VENERE::ZABOTMarco Zabot-Adv.Tech.mgr-Turin ACTFri Oct 09 1987 09:5615
	re. 22
	
	I was trying to create a Source that allow me to scan a disk, find
	all the directories /files, compress them and create another source
	file to decompress and reconstruct the disk. You know, the FISH disk
	problem ( see note #783.*).

	Do not flame , PLEASE. I know would be better to use C then the shell
	but I'm lazy ... and a poor programmer.

	The idea was to pipe DIR XXX:.../* into a source, scan each line and
	act accordingly.

	Any way of doing it ??
	marco
742.24An interesting shell hackWHYVAX::KRUGERSun Oct 11 1987 01:4514
    Cute hack in shell:
    
    To make the prompt be the current directory at all times
    
    set _cd "%q unalias cd; cd $q; alias cd $_cd; set _path $_cwd\">\""
    alias cd $_cd
    
    then you just cd to wherever your default is and away you go!
    
    I'd really like to see everyone's favorites like this. I have a
    feeling there are some really fun, clever, and useful aliasi our
    there....
    
    dov
742.25*GROSS* but usefulROZETT::SANTIAGOSlidin dwn the razorblade of lifeSun Oct 11 1987 14:214
    alias pushd    "%x set DirStack $_cwd\"^\"$DirStack;cd $x;echo $_cwd"
    
    alias popd     "strhead _cwd \\\^ $DirStack;strtail DirStack \\\^
    $DirStack;echo $_cwd;cd $_cwd"
742.26A better way.CGFSV1::DREWSteve DrewSun Oct 11 1987 19:5757
    re: .24

    You can actually create an alias with the same name as the command you
    wish to execute, be it a shell command or an external command. This is
    done by placing an overide marker '\' before the command to be executed
    this prevents shell from alias searching. This prevents "Alias Loops".

    eg. to create an alias called cd that calls cd 

    alias cd "echo doing a cd; \\cd"

    in order to insert an overide you must quote it with an overide, thus
    the double overide above.

    Now heres my alias for cd. It creates a prompt in red of only the 
    device volume name that I'm cd' to. You could easily change it to
    only use the last directory spec ect...

         alias cd    "%q if $q; \\cd $q; else; echo $_cwd;endif;
               strhead q : $_cwd;set _prompt ^[[33m$q\\\>^[[0m \""

    Notice the 3 overides to get the '>' to not be interpreted as redirection.
    On the alias pass of the parser it resolves to:     ^[[33m$q\>^[[0m "
    thus leaving an overide to quote the '>' character when the set _prompt
    command is run through the parser when the alias is actually executed.

    Heres some of my aliases :

# query before deleting. (ala vms: Delete/confirm)
# eg. qd *.o
#
        alias qd "%q foreach i ( $q ) \"echo -n $i Delete [n]
                ;input a;if $a = y;del $i;endif\""
#
# run sonix, in background, but cd the background task to it first.
#
        alias sonix "run cd sonix: +^J^J sonix"
#
# devinfo on all my disks
#
        alias info  "devinfo dh0: dh1: df0: df1: df2: vd0:"
#
# short directory listing
#
        alias d     "dir -s"
#
# Clear screen, also bound to f10
#
        alias clr   "echo -n ^l"
        set f10  clr^M

        
    The possibilities are endless :-)
    
    Steve.
    
742.27Wish list <n>16BITS::KRUGERSun Oct 11 1987 21:5111
    Thanks for the tip!
    
    There's nobody like the source :-}
    
    Anyway, nice job -- you know it's coming -- BUT...
    
    It would be so much nicer if you'd support more regular expression
    stuff. A la [a,b,c,d]*  or [a-t]*  or even [!a-r] (which I would
    prefer to [^a-r] because the ! as not is much more consistent.)
    
    Great work!
742.28ANGORA::SMCAFEESteve McAfeeWed Oct 14 1987 21:0821
    
    I've run into something that's driving me buggy:
    
    If I have:
    
      $ set _path sys:system

    then neither of the following work:
    
      $ format
      $ Format
    
    but the following always works:
    
      $ sys:system/format
    
    what is going on?
    
    regards,
    
    steve mcafee
742.29the solution: re .28WHYVAX::KRUGERWed Oct 14 1987 21:285
    You need the / at the end of the path (a bug in my opinion)
    
    try:
    
    set _path sys:system/
742.30Annoying things, maybe not in ShellZ::TENNYDave Tenny - VAX LISP DevelopmentThu Oct 15 1987 11:5832
I've had problems with shell/manx combinations.  When using the manx
linker and/or compiler (3.40a) ; sometimes my machine freezes.
I wonder if the following note is related?  Maybe it's not shell at all
in my case, Manx is certainly screwy enough.

Dave


Newsgroups: comp.sys.amiga
Path: decwrl!pyramid!oliveb!ames!husc6!mit-eddie!mit-amt!mit-atrp!ralph
Subject: Re: Shell 2.07M problem?
Posted: 13 Oct 87 19:49:50 GMT
Organization: MIT Amiga Users Group c/o MIT Cognitive Info. Processing Group
 
In article <1987Oct12.214644.24296@sq.uucp> hobie@sq.uucp (Hobie Orris) writes:
>
>
>	I tried using the latest Dillon/Drew shell and found it unusable for
 
I also got it and with great hope tried it out. However, after using it
for about 15 minutes, it managed to kill the workbench process.
The machine was still running fine, but no workbench icons or windows
were being refreshed. I need my workbench !
I suspect the creator of the shell 2.07m doesn't use the workbench and hence
hasn't noted this bug. I would be very happy if the bug were identified
explicitily and then routed out. I get nervous when someone says:
"Well, we moved some code around to fix bug X, and meanwhile bug Y went
away too, but we don't know why."
Scary, with Halloween coming soon and all.
 
Ralph (Amiga-man).
742.31CGFSV1::DREWSteve DrewFri Oct 16 1987 14:1529
    Ralph (the preceding note from usenet) emailed me on his problem.
	
    When his system hung up (only once) he was running about a dozen
    tasks, like performance mon, compilers, workbench, facc, txed
    popcli, 7 extra windows open(interlace mode), & shell.
    
    Some how with all that crap running and workbench dies he points
    the finger at shell. Of course he can't tell me if he was even doing
    any shell commands at the time. So I'm not gonna panic. :-)
    
    re: .30
    
    Dave, correct me if I'm wrong:
    
    while compiling under manx (maybe using shell) your machine sometimes
    freezes. Usually it's be up for a while eg. >1 hour and you are
    running on a supra drive.
    If this is all true then you are seeing the same symtoms that I
    am. and I don't think it's shell but rather the supra driver.
    In my case if I have another cli open I can still function if I
    directory access any device other than the supra drive. eg:
   " df0:c/dir df0: ".  But as soon as I cause my process to look at
    the supra drive it then too hangs.
    
    I phoned supra about this and they said it is
    quite possible for the problem to be their drive and to wait for
    a new release.
    
    
742.32Z::TENNYDave Tenny - VAX LISP DevelopmentFri Oct 16 1987 15:1210
Hi Steve,
Yes, I think you might be right about the supra driver.
The fact that it happens when I am using manx also means
I am doing I/O to that drive.  

Guess we'll just wait for the new drivers and see.
(Not to mention 1.3 hard drive support from amigados...)

Thanks,
DAve