AmigaOS Shell issue (FE Update 1)

A forum for general AmigaOS 4.x support questions that are not platform-specific
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: AmigaOS Shell issue (FE Update 1)

Post by xenic »

tonyw wrote: The way it is now, you can type several commands separated by LFs, and they will be executed all at once. If you type "History", you will see the individual commands and you can Up-Arrow to get any one of them in turn.
The contentious part is this: what should happen if you say, type "aaa"<LF>"bbb"<LF>"ccc"<up-arrow> ? Well, the answer is that typing Up-Arrow at the end of a multiple command cancels the command completely.

I'll release it to the beta testers and see what they think.
O.K. In that case you might want to look at what "run [command] +<Enter> [command] +<Enter> [command]" does when you type Up-Arrow at the end of the sequence and then <Enter>.
For example, entering:
run echo line1 +
echo line2 +
echo line3 +
<up-arrow twice>
echo line2 +
<Enter>
<You get a new line but nothing gets executed>
<Enter again and you see these lines in the shell>
line1
[CLI 10]
line2
line3
line2

The result is a little confusing but harmless unless the commands were copy & delete instead of echo.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1445
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: AmigaOS Shell issue (FE Update 1)

Post by tonyw »

run echo line1 +
echo line2 +
echo line3 +
<up-arrow twice>
"Stop right there", as the girls used to sing. The first up-arrow will cancel the whole "composite command" string and show the last command, whatever that was. You can't just back up to the last partial command. The old 68K version didn't, either, so I don't feel that I've lost anything.

[edit]

Sorry, I didn't appreciate that you were talking about special behaviour with the "+" character. I'll have to examine that and see how it works (part of the Shell, perhaps? It's certainly not part of the con-handler or console).
cheers
tony
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: AmigaOS Shell issue (FE Update 1)

Post by xenic »

tonyw wrote: Sorry, I didn't appreciate that you were talking about special behaviour with the "+" character. I'll have to examine that and see how it works (part of the Shell, perhaps? It's certainly not part of the con-handler or console).
That's OK. It's a 'not well known' and little used part of the Amiga shell. I just thought I'd let you know that it can also produce mysterious results when you up-arrow through the history.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
thomasrapp
Posts: 289
Joined: Sat Jun 18, 2011 11:22 pm

Re: AmigaOS Shell issue (FE Update 1)

Post by thomasrapp »

xenic wrote: <You get a new line but nothing gets executed>
<Enter again and you see these lines in the shell>

Actually I don't see why you complain. This is exactly what I would expect to happen. If you end your input with a + sign, no matter whether you entered it on the keyboard or if you retrieved it from the command line history, the run command would wait for more input. Just like it did after line1, line2 and line3 the first time.

Or is your complaint about [CLI 10] coming late, after line1? This is because it's running asyncronously. The echo line1 and the print of [CLI 10] run at the same time. Whoever gets the CPU first will print first.
xenic
Posts: 1165
Joined: Sun Jun 19, 2011 12:06 am

Re: AmigaOS Shell issue (FE Update 1)

Post by xenic »

thomasrapp wrote: Actually I don't see why you complain. This is exactly what I would expect to happen. If you end your input with a + sign, no matter whether you entered it on the keyboard or if you retrieved it from the command line history, the run command would wait for more input. Just like it did after line1, line2 and line3 the first time.

Or is your complaint about [CLI 10] coming late, after line1? This is because it's running asyncronously. The echo line1 and the print of [CLI 10] run at the same time. Whoever gets the CPU first will print first.
Read the entire topic. Tony is concerned about how reinstating the Control-J option affects the history and made some changes. I only pointed out that "Run +" works in a similar way with the history in case he wants to change that too. Personally, I'm fine with how "Run +" currently works and understand how it works with regard to the shell history.
AmigaOne X1000 with 2GB memory - OS4.1 FE
Post Reply