OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Utilities => Topic started by: Martin Vieregg on March 25, 2020, 11:12:03 am

Title: MeShell commandline frontend timetable
Post by: Martin Vieregg on March 25, 2020, 11:12:03 am
The last 3 month, I have posted a lot of very OS/2 specific programming questions in the programmers section. Meanwhile, the project of a new OS/2 commandline frontend made a lot of progress. At the moment, I am fixing only minor bugs (false cursorposition in editor...) and the main job is done. A lot of things work better than I originally expected.

What is already done:
- Adaption of the ME editor for the new purpose
- Base cmd.exe functionality (especially cursor up/down command history)
- Base stdin/out functionality
- handling VIO input/output
- User settings notebook, load and save settings
- (soon) saving and restoring output

What I do not implement in the first version 0.5, but for the 1.0 version:
- Command completion with flyover dropdown field (as an user option)
- WPS integration (e.g. doubleclick to a filename from "dir" output opens the file via WPS default connection)
- navigation/history window with a tree, sorted by: Level 1 current directory, Level 2 entered command to jump back into the editor and to restore old commands

But this stuff is much more easier to implement than the stuff which is already done.

I need some help from you for specific jobs:
- I am not an english native speaker (I am german). I need a real native speaker which reads and corrects my english docu. The english docu draft for version 0.5 will be finished in perhaps 1 week and will be extended later.
- If the program should be localized besides english and german, I need help from native speakers. A few text parts (from the WDsibyl environment) are already in nederlands, italian and russian. But first, I have to divide all language specific data from the normal code. Localization makes only sense when the 1.0 version will be nearly finished (in perhaps 2-3 month).

After receiving the corrected english docu, I will publish the first version 0.5. I do not want to publish a version with bugs which are already known and at the moment, I myself find continously minor bugs in daily use and can fix them without problems.

Title: Re: MeShell commandline frontend timetable
Post by: ivan on March 25, 2020, 04:34:20 pm
Hi Martin,

I should have asked this earlier if I had been thinking.  Have you had a look at  Jonathan de Boyne Pollard's command line utilities?  They might have given you some help.

If you need help editing the 'English' English version of your documents I can put on my editors hat and help.
Title: Re: MeShell commandline frontend timetable
Post by: David Graser on March 25, 2020, 05:00:02 pm
Hi Martin,

I should have asked this earlier if I had been thinking.  Have you had a look at  Jonathan de Boyne Pollard's command line utilities?  They might have given you some help.

If you need help editing the 'English' English version of your documents I can put on my editors hat and help.

It is a shame that Jonathan would never release his source code.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Iturbide on March 25, 2020, 05:43:14 pm
Hi Martin

Thanks for keep coding for the OS/2 platform. I hope to see your MeShell tool in your website  (http://www.hypermake.com/english/home.html)soon. Please let us know.
I also hope that some of your OS/2 software gets eventually open sourced, so the knowledge can be shared and preserved.

Regards
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on March 26, 2020, 11:33:39 pm
Ivan,
thank you for your kind offer can you send me an E-Mail directly? See www.hypermake.com thank you.

Martin,
yes, I plan to send the code to other persons as a backup if it has got a final state. At the moment, I do a lot of bugfixing and I am not satisfied with the state of my programs.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 05, 2020, 01:06:36 pm
I have finished now MeShell 0.5 commandline frontend for cmd.exe and 4os2.exe.

Please read carefully the readme.txt and the help chapters 1 and 3. You have to understand the concept first before using the program.

Here you can download MeShell.zip (http://www.hypermake.de/archive/meshell.zip) (500 kB)

This is the first pupblished version. Please collect bugs and comments and E-Mail them to me.

Ivan and others: If you want to edit the help docu, please send me an E-Mail. But I will only send the docu source to one person simultaneously and I will note this here. The docu source is in Hypermake format. You can edit it with an arbitrary editor (without syntax highlightning), with Hypermake or with WSedit.

Please do not upload to hobbes or to other locations at the moment.
Title: Re: MeShell commandline frontend timetable
Post by: ivan on April 05, 2020, 02:56:08 pm
Hi Martin,

I sent you an e-mail several days ago, I hope it got to you.  If not use ivan10atfreedotfr (remove at dot).
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 05, 2020, 04:51:12 pm
I've sent the docu source to Ivan now.
Title: Re: MeShell commandline frontend timetable
Post by: ivan on April 05, 2020, 09:46:13 pm
Got them thanks, will start tomorrow.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 06, 2020, 07:41:48 pm
 Please turn off the setting on the Save page of the settings notebook: "remove similar commands from list". This is buggy. Entering a command can crash MeShell. I will fix this in the next update.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 15, 2020, 05:17:01 pm
Now I have published version 0.51. A lot of critical bugs are solved. Now the program should be ready for "daily use". I have not implmenend new functionality. English docu is revised (thanks to Ivan!) and a german docu is also availabe. Locatiion is still the same.

Please read carefully the readme.txt and the help chapters 1 and 3. You have to understand the concept first before using the program.

Here you can download MeShell.zip (http://www.hypermake.de/archive/meshell.zip) (500 kB)

Please collect bugs and comments and E-Mail them to me.

Please still do not upload to hobbes or to other locations at the moment.

I am sorry, but there's a big problem left: Do not execute a cmd file with PAUSE command. I start a new thread in the programmers section for solving the problem.


Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 16, 2020, 01:26:58 pm
Please repeat the download. I have updated to MeShell to version 0.52  MeShell.zip (http://www.hypermake.de/archive/meshell.zip) (650 kB). Now PAUSE works again. The bug also refers to a malfunction, when a program wants user input.
But user input of a program is still not perfect, because cmd.exe does not send a text in the same line before entering input. PAUSE is not envolved.

PAUSE requires pressing ENTER, even the text is "press any key".
Title: Re: MeShell commandline frontend timetable
Post by: Sergey Posokhov on April 16, 2020, 11:53:16 pm
Yes, it works!

Would you like to add some mouse actions, for example, "Select, Copy and Unselect" when "Shift" is pressed?
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 17, 2020, 10:37:59 am
Quote
"Select, Copy and Unselect" when "Shift" is pressed?

Please take a look at the "Feeling" page of the settings notebook. The editor should be comparible with other editors. Or do you want specific commands? Please be more concretely.
Title: Re: MeShell commandline frontend timetable
Post by: Sergey Posokhov on April 19, 2020, 04:08:54 am
Let's call it "Click and Select".

Then, if "Shift" is pressed, — Copy (into Clipboard) and Unselect.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 19, 2020, 03:26:42 pm
thank you for the description. A good idea. I have implemented it in the new version 0.53, a minor bugfix:

 MeShell.zip (http://www.hypermake.de/archive/meshell.zip) (650 kB)

If you press SHIFT, Column block gets temporary activated, and when pressing CTRL while releasing the mouse button, the selected text gets copied to the clipboard and gets deselected. I will implment this feature on all my editors.

There are still casually bugs and crashes. If you find out how to reproduce such a bug, then send me a detailed step-by-step explanation. Thank you. A step-by-step description how to reproduce the bug is more useful than log files (-log parameter).
Title: Re: MeShell commandline frontend timetable
Post by: Martin Iturbide on April 20, 2020, 03:03:12 am
Hi

It is looking very nice. I like it.

Regards
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 25, 2020, 03:34:41 pm
I have again updated to a new version MeShell 0.55 (http://www.hypermake.de/archive/meshell.zip)
There is no functionaltiy added. A handful bugs (also crashes) are fixed. Some specific stuff has not been programmed yet, e.g. copying several commands from the clipboard into MeShell.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on April 27, 2020, 09:30:52 am
Pasting from clipboard fails in 0.55 if not a complete line with RETURN is copied. This is in 0.56 fixed: MeShell 0.56 (http://www.hypermake.de/archive/meshell.zip)
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 07, 2020, 03:47:39 pm
And again, a new version of MeShell:

 MeShell 0.60 (http://www.hypermake.de/archive/meshell.zip)


The new chapter about WPS integration is short:

Quote
In the Top Panel, you find a folder icon. Clicking or pressing F5 opens the WPS folder which is current in the current prompt.

Reverse, you can drop a folder icon into the MeShell editor. There are two different behaviours: Dropping into the read-only area (old output) generates a "cd Foldername" and the folder directory gets the current directory in the commandline interpreter. Dropping into the area where you type a new command copies the full folder name as text into the edit area.

Double clicking to a filename executes the WPS default association, e.g. clicking to a text file name opens the associated editor. MeShell completes a file name by adding the full directory name from the last prompt in the old ouput, if the filename contains no backslash characters. This works for example with a "dir" command.

The normal drag and drop functionality of the editor is supported, nevertheless. But it is restricted to the area where you can edit behind the current prompt. Default is copying file content, Ctrl copies the file name without directory name and Ctrl-Shift the full file name.


Title: Re: MeShell commandline frontend timetable
Post by: Martin Iturbide on May 07, 2020, 05:15:14 pm
Hi Martin

Just as a general suggestion, it would be good to have an alternative set of keys combinations to the Functions keys (F1, F2...etc) since it seem that the PC market is little by little discontinuing those keys from the keyboards. So, even if we like F keys it is also good to set some alternative shortcuts on the software.

Regards
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 12, 2020, 11:38:21 am
I have uploaded a new version 0.61 of MeShell (http://www.hypermake.de/archive/meshell.zip)


GCC users please run with -fdiagnostics-color=always and compare the color output with the original VIO window. Thank you.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 14, 2020, 04:12:31 pm
Again I have uploaded a new version 0.62 of MeShell (http://www.hypermake.de/archive/meshell.zip)

I could fix several bugs, all concerning colors and the order of stdout and stderr. If you use MeShell for colored compiler output and similar things, please update.

4os2 (meshell commandline parameter /4os2) shows colored prompts, but not colored output for e.g. "dir". I assume it is the same mechanism described here (https://www.os2world.com/forum/index.php/topic,2438.0.html). In GCC, you have to enter a specific parameter to turn on colored redirected output. By default, redirected output is shown without colors. I hoped to find a setting for 4os2, but did not find it. Two questions:

1. Does anyone know how to turn on colored output in 4os2 when output is redirected?

2. If no, who is responsible for the 4os2 code ? Implementing such a setting would be quite easy, because only a feature has to be turned off.
Title: Re: MeShell commandline frontend timetable
Post by: Dave Yeo on May 14, 2020, 04:25:51 pm
4OS2 lives at http://trac.netlabs.org/4os2 (http://trac.netlabs.org/4os2) where you can file an issue as well as download the source to find out how it does colours and maybe come up with a patch.
Edit, A perforce client should be on Hobbes, perhaps https://hobbes.nmsu.edu/download/pub/os2/dev/util/perforce20022.zip (https://hobbes.nmsu.edu/download/pub/os2/dev/util/perforce20022.zip) for source checkout.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 14, 2020, 05:49:38 pm
Thank you Dave. But I have no idea how to register to send a ticket.
Title: Re: MeShell commandline frontend timetable
Post by: Andreas Schnellbacher on May 14, 2020, 05:59:45 pm
Create a general netlabs.org account: http://www.netlabs.org/en/site/member/member.xml (http://www.netlabs.org/en/site/member/member.xml)
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 20, 2020, 01:03:40 pm
Again I have uploaded a new version 0.63: MeShell archive (http://www.hypermake.de/archive/meshell.zip)

0.63 is a only a bugfix, but an important one. When starting MeShell and when copying several command lines from the clipboard into the editor, MeShell could freeze. Other minor things are also fixed.

At the moment, it is not possible to register at netlabs, I contacted Adrian already. Can someone tell me a current developer of 4os2? Then I try to get contact with E-Mail. Or another person could send a ticket after I have sent him my informations.
Title: Re: MeShell commandline frontend timetable
Post by: David Graser on May 21, 2020, 12:44:54 am
Again I have uploaded a new version 0.63: MeShell archive (http://www.hypermake.de/archive/meshell.zip)

0.63 is a only a bugfix, but an important one. When starting MeShell and when copying several command lines from the clipboard into the editor, MeShell could freeze. Other minor things are also fixed.

At the moment, it is not possible to register at netlabs, I contacted Adrian already. Can someone tell me a current developer of 4os2? Then I try to get contact with E-Mail. Or another person could send a ticket after I have sent him my informations.

Steven Levine at one time was updating 4OS2 and his home page is here

http://www.warpcave.com/

His email is listed at the bottom left of the page.
Title: Re: MeShell commandline frontend timetable
Post by: Andi B. on May 21, 2020, 01:22:08 pm
.....At the moment, it is not possible to register at netlabs, I contacted Adrian already. Can someone tell me a current developer of 4os2? Then I try to get contact with E-Mail. Or another person could send a ticket after I have sent him my informations.
Adrian regularly reads the newsgroup - gmane.org.netlabs.community

I would say there is no current developer for 4os2. As you can see here - http://perforce.openwatcom.org:4000/@md=d&cd=//depot/public/4os2/&c=MoC@//depot/public/4os2/?ac=43&mx=50 - over the last years Steven fixed some tickets and packed the latest packages together. The last major improvements were made by me about 10 years ago. Including making the netlabs project pages and writing down all infos about here - http://4os2.netlabs.org/en/site/index.xml And no, sorry, there is no list of special 4os2 commands in the sources which would help you. At least I didn't find such when I looked at it a few days ago triggered by your discussions here and at os2.org.

If you found a bug in 4os2 and urgently want to create a ticket for it you can post it here. If it is that urgent that you can't wait on Adrians response for your own netlabs user data I can copy it over. But as said above, when you want to look at the sources you have to use p4 to check out from http://perforce.openwatcom.org:4000 or use the web interface there.

A few days ago I started again the discussion about transferring 4os2 sources to a more modern version control system and place it at f.i. bitbucket.org. Or at svn.netlabs.org. But given the (no) response it seems no one cares about. 
Title: Re: MeShell commandline frontend timetable
Post by: Pete on May 21, 2020, 03:01:02 pm
Hi Andi

Re: "Adrian regularly reads the newsgroup - gmane.org.netlabs.community "

Is there a special trick to reading this newsgroup?

I ask because news gmane has not been working for a long time and pointing a browser at http://gmane.org.netlabs.community/ results in a "address not found" error.


Regards

Pete
Title: Re: MeShell commandline frontend timetable
Post by: Andi B. on May 21, 2020, 04:28:09 pm
I read netlabs groups via Seamonkey newsreader since ages. Guess every news reader will handle it. NNTP, server name - news.gmane.org, port 119
Title: Re: MeShell commandline frontend timetable
Post by: Dave Yeo on May 21, 2020, 04:59:12 pm
Gmane stopped working here some time back, just tried with SM and it timed out. I'm subscribed to the mailing list, which is low volume. Start here, http://www.netlabs.org/site/community.xml (http://www.netlabs.org/site/community.xml)
Title: Re: MeShell commandline frontend timetable
Post by: Heikki Kekki on May 22, 2020, 08:27:13 am
Gmane stopped working here some time back, just tried with SM and it timed out. I'm subscribed to the mailing list, which is low volume. Start here, http://www.netlabs.org/site/community.xml (http://www.netlabs.org/site/community.xml)
I use ProNews/2 and recall Gmane didn't work for few days some time back. Latest post I see in gmane.org.netlabs.community:
Code: [Select]
Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail
From: Andreas Schnellbacher <---@------.------.>
Newsgroups: gmane.org.netlabs.community
Subject: Re: svn dead - Trac works
Date: Mon, 27 Apr 2020 17:50:54 +0200
Title: Re: MeShell commandline frontend timetable
Post by: Dave Yeo on May 22, 2020, 08:35:27 am
Still timing out here, though I admit I seldom try. Last message is 3 years and 3 days old that I see.
Title: Re: MeShell commandline frontend timetable
Post by: Andreas Schnellbacher on May 22, 2020, 09:12:37 am
Heikki, could you remove my email address from above?

Edit on 18:20 GMT: I've just written an email to the admin.
Title: Re: MeShell commandline frontend timetable
Post by: Pete on May 22, 2020, 03:01:44 pm
Hi All

Yes, Andi, those are the settings in use for news.gmane and, like Dave, all I ever see is a response that tells me connection timed out.

Why would news.gmane work for some people but give a "connection timed out" to others?


Regards

Pete
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 22, 2020, 03:24:36 pm
(subject: contact to 4os2 authors)
Silvan Scherrer told me the e-mail address of Andreas Buchinger, but I did not receive an answer. Does anyone has contact to Steven Levine?
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 22, 2020, 04:40:20 pm
I have found a suspect behaviour of MeShell and Info-Zip

Code: [Select]
[C:\] zip<RETURN>
  adding: -

zip error: Interrupted (aborting)
(wild binary characters)

In the log file, it is seen that "ZIP^M^J" is sent correctly to cmd.exe, without added spaces. I have no idea at all what happens here.
Title: Re: MeShell commandline frontend timetable
Post by: Andi B. on May 22, 2020, 04:46:32 pm
Hi All

Yes, Andi, those are the settings in use for news.gmane and, like Dave, all I ever see is a response that tells me connection timed out.

Why would news.gmane work for some people but give a "connection timed out" to others?


Regards

Pete
Sorry you're right. gmane newsgroups don't work here anymore too. Just tested and it timed out. Previously I though it works cause usually all my newsgroups are read at startup and I did not get any error message.
Title: Re: MeShell commandline frontend timetable
Post by: Andreas Schnellbacher on May 22, 2020, 08:17:14 pm
Forget about gmane. They won't come back. It's dead since a long time. They managed to restore a part, but not the netlabs.org tree.

Mailing lists exist on netlabs.org, but according to Martin V., registration isn't possible ATM. I am subscribed to many netlabs.org mailing lists, hence my posting.
Title: Re: MeShell commandline frontend timetable
Post by: Laurence Pithie on May 22, 2020, 08:24:48 pm
Code: [Select]
[C:\] zip<RETURN>
  adding: -

zip error: Interrupted (aborting)
(wild binary characters)
When I try to  compress stdin in version 0.63 of MeShell the EOF doesn't seem to reach the zip process, so I have to use ctrl-c to interrupt the process. Is that the behaviour you are seeing?

 AFAIR you are using a named pipe to communicate between the parent process and the cmdhelper process. So, if you write an EOF to the named pipe from the parent, reading the EOF in the cmdhelper process is interpreted as  there's no data in the pipe, so it doesn't write anything to the standard input of the zip process.
Code: [Select]
[C:\]cat <RETURN>
Shows the same behaviour, Typing the EOF character (ctrl-z) doesn't end the CAT process, it's ignored. The simplest work around  is probably to use a semaphore to indicate to the cmdheloer process that it should write an EOF to the standard input of the command running in the shell when the user types ctrl-z in the parent application.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 22, 2020, 11:00:23 pm
I have contact now with the second 4os2 author Andreas Buchinger. I think now I will manage the changes I need for MeShell. Thank you.
Title: Re: MeShell commandline frontend timetable
Post by: Dave Yeo on May 23, 2020, 02:44:21 am
I have found a suspect behaviour of MeShell and Info-Zip

Code: [Select]
[C:\] zip<RETURN>
  adding: -

zip error: Interrupted (aborting)
(wild binary characters)

In the log file, it is seen that "ZIP^M^J" is sent correctly to cmd.exe, without added spaces. I have no idea at all what happens here.

Are you opening your pipe in binary mode?
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 23, 2020, 10:50:21 am
The zip.exe pipe problem is not related to MeShell. This results in a normal commandline window:

Code: [Select]
[C:\]zip >out.txt
  adding: -              (now pressing Ctrl-C)

zip error: Interrupted (aborting)

[C:\]do which zip
H:\SOFTWARE\SHARE\PATH\zip.exe (219 kB;14.08.2010 03:11)
C:\USR\BIN\zip.exe (107 kB;20.02.2018 15:56)

[C:\]C:\USR\BIN\zip.exe >out.txt
  adding: -              (now pressing Ctrl-C)

zip error: Interrupted (aborting)

[C:\]type out.txt
(binary nonsens characters)               
[C:\]

It seems to be an Info-Zip bug. Unzip works. Windows zip.exe has the same buggy behaviour.
Title: Re: MeShell commandline frontend timetable
Post by: Andreas Schnellbacher on May 23, 2020, 06:03:03 pm
No, it's not a bug. From zip --help:

If zipfile and list are omitted, zip compresses stdin to stdout.
Title: Re: MeShell commandline frontend timetable
Post by: Heikki Kekki on May 23, 2020, 10:11:36 pm
Heikki, could you remove my email address from above?
Sorry, my bad.
Title: Re: MeShell commandline frontend timetable
Post by: Dave Yeo on May 24, 2020, 01:49:18 am
No, it's not a bug. From zip --help:

If zipfile and list are omitted, zip compresses stdin to stdout.

Lots of *nix utilities default to inputting from stdin, and some use a single dash as a parameter for using stdin. Likewise for outputting to stdout if no file name.
Title: Re: MeShell commandline frontend timetable
Post by: Martin Vieregg on May 24, 2020, 02:34:55 pm
I implemented now a simple workaround for the next MeShell version:
If the user enters ZIP<ENTER>, then the command gets transformed to "zip -help". This works fine.
Title: Re: MeShell commandline frontend timetable
Post by: Andreas Schnellbacher on May 24, 2020, 08:13:57 pm
Lots of *nix utilities default to inputting from stdin, and some use a single dash as a parameter for using stdin. Likewise for outputting to stdout if no file name.
Sure, I remember that behavior for all TeX compilers.