AmigaOS Shell issue (FE Update 1)

A forum for general AmigaOS 4.x support questions that are not platform-specific

AmigaOS Shell issue (FE Update 1)

Postby Amigo1 » Mon Sep 04, 2017 11:46 am

I'm starting a new topic on this issue:

I noticed the Key sequence "CTRL-J" does not work the way it is described on the wiki AmigaDOS_Understanding_the_Shell under the section "Command Line Editing and Control". The wiki it says:
Ctrl+J Adds a line feed.

That's the way it behaved since AmigaOS 1.3
But now since at least AmigaOS 4.1 Update 5 it behaves like
Ctrl+M Processes the command line (same as Return)


With the old console/shell you could enter more commands and execute them sequentially e.g.:
Code: Select all
date <CTRL-J>
echo "lha x ram:test.lha" <CTRL-J>
date <RETURN>


and the result would be

Code: Select all
Saturday 02-Sep-17 02:08:00
lha x ram:test.lha
Saturday 02-Sep-17 02:08:01


It behaves correctly under AmigaOS 4.1 update 1 on a Sam440.
AmigaOS 4.1 Update 5 has "CTRL-J" the same asl "CTRL-M" already.

Sometimes it is handy to use CTRL-J the way it was described in the AmigaOS 3.1 manual too. Maybe it can be brought back? 8-)
User avatar
Amigo1
 
Posts: 157
Joined: Sun Jan 01, 2012 4:32 pm

Re: AmigaOS Shell issue (FE Update 1)

Postby tonyw » Tue Sep 05, 2017 12:57 am

I wasn't aware that the behaviour had changed. I'll take this as a bug report, thanks.

Filed as BZ #9906 so that I don't forget it.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: AmigaOS Shell issue (FE Update 1)

Postby Amigo1 » Wed Sep 06, 2017 10:21 am

tonyw wrote:I wasn't aware that the behaviour had changed. I'll take this as a bug report, thanks.

Filed as BZ #9906 so that I don't forget it.


Thank you! :)
User avatar
Amigo1
 
Posts: 157
Joined: Sun Jan 01, 2012 4:32 pm

Re: AmigaOS Shell issue (FE Update 1)

Postby tonyw » Wed Sep 06, 2017 1:00 pm

Trying to fix it now: getting the LF (Ctrl-J) to work without ending the command input is easy, but I'm having some trouble with the history handling (Up-arrow for previous command etc).

This part of the code was completely refactored and rewritten back in 2011 and works very differently now.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: AmigaOS Shell issue (FE Update 1)

Postby tonyw » Thu Sep 07, 2017 12:51 pm

I checked old versions and they had the same problem as I did in the latest version - you could enter several commands, separated by <NL>, but when you backed up through them using the Up-arrow, the multiple-line commands gave problems. Even the old 68K versions didn't work properly.

I've fixed it now so that a multi-line command is broken up into separate commands when stored in the History. So as you Up-arrow through them, you see each line in the multi-line command as a separate command.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: AmigaOS Shell issue (FE Update 1)

Postby Amigo1 » Thu Sep 07, 2017 3:12 pm

tonyw wrote:I checked old versions and they had the same problem as I did in the latest version - you could enter several commands, separated by <NL>, but when you backed up through them using the Up-arrow, the multiple-line commands gave problems. Even the old 68K versions didn't work properly.

I've fixed it now so that a multi-line command is broken up into separate commands when stored in the History. So as you Up-arrow through them, you see each line in the multi-line command as a separate command.


Frankly, this is the solution I would have thought of as the best.
Thank you very, very much!! :-) :D 8-)
User avatar
Amigo1
 
Posts: 157
Joined: Sun Jan 01, 2012 4:32 pm

Re: AmigaOS Shell issue (FE Update 1)

Postby nbache » Thu Sep 07, 2017 11:36 pm

Nice work, Tony!

I assume it will be broken up the same way in the saved history file, if you enable that?

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: AmigaOS Shell issue (FE Update 1)

Postby tonyw » Fri Sep 08, 2017 1:47 am

The "saved history file" comes from the console and is representative only of the display on the screen.

This "command input" format we are discussing is a con-handler thang and the console just displays what it is told. All the editing (previous history, erasing/inserting, etc) occurs in the con-handler.

I still have a problem - if you enter one or more commands separated by <NL> and then, instead of typing a new command, you Up-Arrow though the old history, I get the same formatting problems again.
Still working on a fix for that.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: AmigaOS Shell issue (FE Update 1)

Postby nbache » Fri Sep 08, 2017 5:24 pm

tonyw wrote:The "saved history file" comes from the console and is representative only of the display on the screen.
Right, so the saved history will just show that situation as:

prompt$ first_command
second_command
output from both
prompt$

- or what?

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark


Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 3 guests