Path: utzoo!attcan!uunet!husc6!mailrus!ames!vsi1!wyse!mips!dce From: dce@mips.COM (David Elliott) Newsgroups: comp.unix.wizards Subject: Re: echoing style - DOS,VMS vs. Unix (was: AT&T Joining OSF) Message-ID: <3057@dunkshot.mips.COM> Date: 5 Sep 88 15:12:18 GMT References: <1988Sep2.224258.27960@gpu.utcs.toronto.edu> <1402@spp2.UUCP> Reply-To: dce@dunkshot.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 28 In article <1402@spp2.UUCP> baur@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@mips.com or {ames,prls,pyramid,decwrl}!mips!dce