T.R | Title | User | Personal Name | Date | Lines |
---|
521.1 | Small Bug fixed | CGOU01::DREW | Steve Drew | Wed Jun 03 1987 12:12 | 11 |
| There's a newer version of shell 2.06M in dir mentioned in .0
It's just a 2 line bug fix in main.c that solves console problems,
echoing screwed up and such if you had redirected or piped any
commands in your .login file. Dave Weckers .login file managed to
shake this bug out. It took me a while last night to track that
sucker down, (that's the bug, not Dave :-). Anyway you may want
to recopy the executable and shell_source_2.shar. This fixed version
will be the one sent to USENET.
/Steve.
|
521.2 | The official 2.06M version now avail. | CGOU01::DREW | Steve Drew | Wed Jun 10 1987 11:36 | 23 |
|
I added another feature, (by popular request) that also made it
under the wire to the USENET moderator. So the version you got today
or soon from comp.sources.amiga/binaries is a improved version.
Although I only post the _unix version to the USENET. This official
2.06M version is also now in my directory specified in .0
Actually I had put it there last friday but kept forgeting to mention
it.
Any way heres what changed:
- Passing an argument that contains a space to an external command
is now implement the same way as internal commands, also any
expansion of a file name that contains a space will be enclosed
in quotes before being pass to an external command.
the following will now work correctly:
$ rm "foo bar" this worked before
$ DELETE "foo bar" needed "\"foo bar"\" before.
$ "my prog" would not work before
$ myprog * would not work with spaced files before
$ run "pro gram" needed run "\"pro gram"\" before.
Steve.
|
521.3 | | ANGORA::SMCAFEE | Steve McAfee | Wed Jun 10 1987 13:49 | 27 |
| Some minor shell questions:
1. Can I put an ESC char in a command? It's probably backslash
something but I haven't figured it out. (I wanted to set my
prompt to be highlighted.)
2. I have problems sometimes when I try to use an amigados command.
For example: search *.h text
search #?.h text <--- Works from CLI
these both come back with "bad command arguments".
3. I would like to delete some of the amigados commands which shell
provides inherently, but I have one problem. If I want to do
something in the background (e.g. print a file), I might enter
$ run type textfile prt:
Obviously, if I delete the type command from c: this will fail.
What I would like to do is something like the following:
$ run shell "type textfile prt: ; quit"
I'm probably missing something important...
regards,
steve mcafee
|
521.4 | Answers...while you wait | CGOU01::DREW | Steve Drew | Wed Jun 10 1987 23:37 | 74 |
| -> 1. Can I put an ESC char in a command? It's probably backslash
-> something but I haven't figured it out. (I wanted to set my
-> prompt to be highlighted.)
use the carror ^ to insert any control character.
eg ^G would be bell
^L would clear screen
^[ is <ESC>
so: $ set _prompt ^[[1m$" "^[[0m
would give a bold dolar sign space as a prompt.
Personally I alias cd to set my prompt to my current directory
device volume. But aliases and such are very flexible.
eg.
alias cd "%q if $q; \\cd $q; else; echo $_cwd;endif; ... join line..
strhead q : $_cwd;set _prompt $q\\>\" \";"
The above double backslash tells shell your realiasing an internal
command with the same name (prevents, alias loop error).
->
-> 2. I have problems sometimes when I try to use an amigados command.
-> For example: search *.h text
-> search #?.h text <--- Works from CLI
-> these both come back with "bad command arguments".
->
Shell expands all wild cards '?' and '*' to file names before
calling the command to run (internal or external).
since search only expects one file spec *.h will resolve into
maybe many files and be sent to search as: search a.h b.h c.h ect...
This would fail even from a CLI.
In reality search should be smarted enough as some amigados commands
are to accept more than one argument, but it's not.
The solution is :
$ search "#?.h" text
or $ searcg #\?.h text
both cause the shell interpreter to ignore the wild card and pass
it to the command.
-> 3. I would like to delete some of the amigados commands which shell
-> provides inherently, but I have one problem. If I want to do
-> something in the background (e.g. print a file), I might enter
->
-> $ run type textfile prt:
->
-> Obviously, if I delete the type command from c: this will fail.
-> What I would like to do is something like the following:
->
-> $ run shell "type textfile prt: ; quit"
->
-> I'm probably missing something important...
->
Yes, your missing the -c switch to shell. That does exactly what
you want.
eg.
$ run shell -c type textfile >prt:
or $ run shell -c copy textfile prt:
or $ run shell -c copy textfile prt:; another cmd; another cmd ect..
-> regards,
->
-> steve mcafee
Gee.. not bad, three for three. :-)
Steve.
|
521.5 | | ANGORA::SMCAFEE | Steve McAfee | Thu Jun 11 1987 00:00 | 7 |
|
Thanks,
I don't know how I missed that -c switch. I can't wait to bash
away at all those c: commands on my lattice disk...
steve mcafee
|
521.6 | ALIAS- where is it??? | RSTS32::HUNT | Wherever you go, there you are! | Thu Jun 11 1987 11:52 | 10 |
| Hello,
This is kind of off the subject, but it was mentioned in .4 above.
Where can I get a copy of the ALIAS command. It doesn't seem to
be on my disks anywhere.
Phil Hunt
|
521.7 | | PLDVAX::SMCAFEE | Steve McAfee | Thu Jun 11 1987 21:33 | 15 |
|
Alias is a command which is available when one is inside Steve-n-Matt's
shell.
re. .3
Something wierd happens when I use set _prompt ^[[33m$" "^[[0m .
It works fine as far as getting the prompt the way I want it, but
now try to do a couple of up-arrows or down-arrows. The cursor
moves up the screen! I tried other escape sequences and got the
same results. What's going on?
regards,
steve mcafee
|
521.8 | Oh, Yeah | CGOU01::DREW | Steve Drew | Fri Jun 12 1987 00:07 | 14 |
|
Now I remember, putting non printable charactercs into the prompt
string causes the command line editing to become confused as to
how many characters have been put to the screen (including _prompt).
This will be a bit of work to fix. Since not many people have
complained about this restriction (one other about 6 months ago)
I never got around to fixing it.
If I can think of an easy way to do it, I will and let you know.
If conman ever beomes solid, eg: doesnt keep crashing if you hold
down a key and wrap arround to next line stops missing a character
ect... then I could take command line editing out of shell all
together.
|
521.9 | | SQM::JMSYNGE | James M Synge, VMS Performance Anal. | Fri Jun 12 1987 13:56 | 6 |
|
Re: .-1
In what way do non-printable characters cause a problem? Couldn't
you simply print the prompt then ask CON: for the current position?
James Synge
|
521.10 | Not quite that easy | CGOU01::DREW | Steve Drew | Sun Jun 14 1987 17:15 | 15 |
| Re: .9
Agreed that is the way to fix that problem, however it's not quite
as easy as sending an escape sequence and waiting for the cursor
position report back. The reason being is that the user may already
have typed ahead some characters, when I then wait for the cursor
report I end up getting these first.
So to properly do this I have to handle the cursor report
asynchronously in other words, send the request, then imediately
start inputing any characters from the user, if a <CSI> sequence
comes flying in, during this stuff I have to detect and handle it.
This is also the way I was handling the window resizing. So I can
fix it, it's just a little tricky.
Steve
|
521.11 | Quick question? | COOKIE::WECKER | Dave (Cum Grano Salis) Wecker | Sun Jun 14 1987 23:44 | 19 |
| Steve here's what appears to be a bug (been there forever):
If you say something like:
set scr ""
if $scr
run foo
endif
if $scr
df0:c/run foo
endif
The first "if" will ALWAYS execute no matter what "scr" is set to. The second
one will execute only if "scr" is not "".
Any ideas?
dave
|