echoing style - DOS,VMS vs. Unix (was: AT&T Joining OSF)

David Elliott dce at mips.COM
Tue Sep 6 01:12:18 AEST 1988


In article <1402 at spp2.UUCP> baur at spp2.UUCP (Steven L. Baur) writes:
>>> I am always annoyed when it backspaces over my prompt and does other stupid
>>> things.  This kind of code gets put in the line dicipline once, and can be
>>> used with any device driver (including pty's).
>
>This is dependent upon what shell you are using.  If were using ksh,
>you would not notice this problem.
>Sh  will willing backspace over the prompt even on BSD systems.

Actually, it's dependent upon which shell, how the shell is configured,
and which tty driver you are using.

Shells with line-editing (ksh, tcsh, BRL sh, etc.) use some sort of
canonical tty mode and can keep track of the current position on the
line (even with respect to tabs, if they so desire).

Shells without (csh, sh) or line-editing shells with the line-editor
turned off let the tty driver do the work.

What you describe above (backspace over prompt even in BSD) is a by-product
of the tty driver, not the shells.

In other words, it's only affected by the shell because the shell
tries to emulate a smart tty driver, and it's only affected in the
shell (i.e., you can still backspace over a debugger prompt).

-- 
David Elliott		dce at mips.com  or  {ames,prls,pyramid,decwrl}!mips!dce



More information about the Comp.unix.wizards mailing list