Page 2 of 2

Re: AmigaOS Shell issue (FE Update 1)

Posted: Sun Feb 11, 2018 3:12 pm
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.

Re: AmigaOS Shell issue (FE Update 1)

Posted: Tue Feb 13, 2018 12:00 am
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).

Re: AmigaOS Shell issue (FE Update 1)

Posted: Wed Feb 14, 2018 3:23 pm
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.

Re: AmigaOS Shell issue (FE Update 1)

Posted: Wed Feb 14, 2018 4:42 pm
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.

Re: AmigaOS Shell issue (FE Update 1)

Posted: Thu Feb 15, 2018 7:38 pm
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.