recent terminal commands

hcvv wrote a nice explanation with a couple of insignificant points that
could be clarified:

> When Unix like systems (e.g. Linux) emerged on PC hardware, it was of
> course logical to use the keyboard/screen combination as terminal and
> software emulating the hardware terminals was designed (you can still
> see this after pressing Ctrl-Alt-F1). But connection of old hardware
> through cables with or without modems) to the COM ports (later USB)
> was/is also possible.
>
> With the emergence of the X-windows system, one of the first things that
> was build was an application to emulate such a terminal in a window, the
> infamous Xterm program (still available). Later newer (better?)
> implementations were made, often more integrated in the environment of a
> particular Desktop (e.g. Konsole).

The order of events was a little different. Physical terminals first,
then glass full-screen terminals. Windowed terminals came next on
various minicomputers. The first IBM PC was first, but it was way too
weedy to take any part in this discussion except as a terminal itself.
Then came X Windows on Unix and other boxes. Finally, linux hustled onto
the scene. The name of the X terminal program is ‘xterm’.

> And yes, Konsole has the feature of buffering what you see in the
> window, a sort of large virtyual screen with many lines, where you can
> scroll through. Something the original TTY was not able to offer you.

Well, of course the original TTY offered you full history. That’s what
the great big roll of paper was! The glass teletypes and successors were
simply trying to emulate that functionality of the mechanical device.

On 01/23/2014 06:51 AM, flymail pecked at the keyboard and wrote:
> On 2014-01-23, hcvv <hcvv@no-mx.forums.opensuse.org> wrote:
>> And that virtual screen is not the same as the command history most
>> shells have. And yes, there are more programs having it. Of course it
>> should be programs that have a command line interface. I remember mysql,
>> the program with which you manage MySQL/MariaDB. There may be more, but
>> it is of course the program designer that puts it in a program.
> Just a quick question! Is there a terminal environment that doesn’t ignore what you’ve just typed and completes what you
> type (after pressing up-arrow) based on the recent command history?
>
> For example, consider the following:
>
>


> sh-4.2$ rm bar
> sh-4.2$ cp foo bar
> sh-4.2$ rm_ # (your cursor is at _)
> 

If you now press up-arrow, bash will ignore the rm' you've just typed and replace entire line with the line above &gt; (beginning cp’). This behaviour is undesirable; it would be much more efficient if it completed your command with the
> first line since this would preserve what you’ve just typed. The MATLAB console has this feature correctly implemented
> AFAIK. But can it be done in bash?

You need to use <CTRL><PGUP> to find previous commands using the
partially enter command.

Ken

On 2014-01-23, Ken Schneider <suse-list3@bout-tyme.net> wrote:
> You need to use <CTRL><PGUP> to find previous commands using the
> partially enter command.

Beautiful. Thank you.

On 2014-01-23 12:51, flymail wrote:

> For example, consider the following:
>
>


> sh-4.2$ rm bar
> sh-4.2$ cp foo bar
> sh-4.2$ rm_ # (your cursor is at _)
> 

> rm bar
> cp foo bar
{up cursor}
> cp foo bar
{edit that line, go to the start, change the "cp" with "rm"}
> rm foo


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I was away for a day, but thank you dhj_novell for the clarifications.

I indeed suddenly realised yesterday (while being elsewhere) that the paper roll was of course the largest outputbuffer I have ever seen rotfl!.

Also, I am aware hat the ASR33 (the one with the paper roll and where you had to hammer on the keys) is a predecessor to glass terminals. When my post suggests otherwise, I m sorry for that.

And to the OP.
As it is now clear to you that the command history is a shell feature, in your casee probably bash, why don’t you now study the man page of bash. Browse through it searching for

command line editing

and you will see that you can use two types (emacs and vi) and what you can do with them. To much to learn all of it IMHO, but a subset is allways handy.

On 2014-01-24 11:16, hcvv wrote:
>
> I was away for a day, but thank you dhj_novell for the clarifications.
>
> I indeed suddenly realised yesterday (while being elsewhere) that the
> paper roll was of course the largest outputbuffer I have ever seen
> rotfl!.

Indeed… didn’t think of it that way.

> Also, I am aware hat the ASR33 (the one with the paper roll and where
> you had to hammer on the keys) is a predecessor to glass terminals. When
> my post suggests otherwise, I m sorry for that.

I once accessed an MsDos computer via printer and keyboard.

The display had broken down. I used that method to set up serial port
communication to an older computer with incompatible display, in order
to use the computer “remotely” via serial port, while I decided how to
buy a new display.

Even MsDOS computers could be used with a “terminal” :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Superb informative article, Henk. Enjoyed it.

I have a question about this statement, if you don’t mind.

I am not trying to be a grammar-granny smart-a**** here, so don’t take it wrong. Generally, famous means what everyone understands it to mean, whereas infamous is often misused: Technically, infamous means something that is famous because it was bad.

Did you mean that Xterm was well-known for being awfull or kludgy or unreliable, or that it was universally disliked for some other reason?

I would like to know more, if so. Just a bit curious. (Yes, I know, curiosity killed the … see my avatar!) ;-D

-fb

Ooooh!

Shades of deja vu!

Been there, done that, as well.

rotfl!

It was with some hesitation that I wrote “infamous”. (But it was also a trigger and you tripped it :)).

In the beginning of the X-window system and the Common Desktop Environment (CDE), xterm was by far the most often used application. I have now before me on my (hardware) desk a (paper) copy of “Using the X Window System” from Hewlett Packard (Edition 6, 1992). The man page of XTERM is in there. It consists of 20(!) pages (smaller then A4, but small print) packed with information. At the end of the section BUGS it says:

This program still needs to be rewritten It should be split into very modular sections, with the various emulators being completely seperate widgets that don’t know about each other. Ideally, you’d like to be able to pick and choose emulator widgets and stick them to a single control widget.

And the AUTHORS section starts with:

Far too many people, including:

IMHO those were hints to a top heavy spaghetti programmed monolyth.

I assume that what you find now on your openSUSE is a GNU rewritten xterm.

… I thought it might be. :wink:

Thanks for the answer. Interesting.

-fb