Re: Backspace



Thanks for helping everybody.

But actually I'm using Bourne shell on FreeBSD 6.1 just like the
Solaris in lab, and the FreeBSD is freshly installed, I have checked
.shrc and .profile, but nothing related to key bindings or stty's
there, so what I thought it should be is:

after I login -> [press backspace] -> ^H appears -> [press DEL] -> ^? appears
in emacs -> [press backspace] -> oops, help appears

I think Solaris was just like the above. But in my FreeBSD, things go like:

after I login -> [press backspace will erase last char] -> [press DEL
does the same thing]
no matter what have I done to "stty" like "stty erase ^H" and "stty
erase2 ^H", the result is just the same, backspace and DEL still can
be used to erase last char in shell. The only difference is in emacs,
but I searched the net and found that emacs relies on its own
definition of key bindings in ~/.emacs file (it is empty in this
case), rather than the terminal key bindings. Totally confused.

Any idea? Thanks again for you kind people.

2007/8/13, Jerry McAllister <jerrymc@xxxxxxx>:
On Sun, Aug 12, 2007 at 01:31:36PM -0500, Derek Ragona wrote:

At 10:54 PM 8/11/2007, d.Z. wrote:
Hello,

I'm a new user to FreeBSD and Unix. I used Solaris 10 last week in
lab, and found there is a difference between them.

When Solaris is installed, press backspace will give you ^H, you'll
have to "stty erase ^H" to solve this problem. But with FreeBSD 6.1,
when first installed, backspace is always bounded to erase last
character, even I have "stty erase ^?" and "stty erase2 ^?", backspace
still deletes last character input. Does any body know why is this
happening?

Solaris by default uses csh for user accounts. The backspace key
assignment and for that matter, all key assignments are dependent on the
both the shell and terminal definition. Reassigning keys is typical for
your shell's startup profile file .cshrc for csh and .bashrc for bash.


And strange thing is with default setting (before stty erase and
erase2 to ^?), when I use Emacs, C-h will give me back space, instead
of help. I know this is desirable for experts, but I'm really new so
just want to follow the instruction first.

Applications like the shell you use interpret the terminal definition and
may or may not use the same key assignments. Most applications like the
shells in UNIX environments have startup files to customize the key
assignments and in the case of editors even define macros.

And those startup files are:

For csh and tcsh (tcsh is the most common one in FreeBSD)
the startup file is .cshrc in one's home directory. You can also
create a system-wide one.

For SH and bash it is .profile and for them don't forget to export
any variables.

////jerry


Hope this helps.

-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Backspace
    ... I'm a new user to FreeBSD and Unix. ... When Solaris is installed, press backspace will give you ^H, you'll ... all key assignments are dependent on the ... shells in UNIX environments have startup files to customize the key ...
    (freebsd-questions)
  • Re: bug in /bin/sh?!?
    ... Is it correct that field splitting isn't performed on default/alternate ... Splitting does occur in bash, mksh, pdksh and zsh in FreeBSD. ... The Solaris 10 version of /bin/sh shell does not accept the original at ... Solaris accepts the original, but it splits the result at whitespace. ...
    (freebsd-hackers)
  • Suche eine Inspiritation... :-)
    ... Mit zwei Prozessoren, 2GB RAM ... Dann kam FreeBSD 6.irgendwas drauf, ... wirklich mit Solaris funktioniert. ... Controller von Promise oder was weiß ...
    (de.comp.os.unix.misc)
  • Re: Anyone using freebsd ZFS for large storage servers?
    ... Solaris is not a viable option. ... FreeBSD looks like the next best available option at the moment, ... support my OpenSource projects and personal files. ... of course Solaris has latest version of ZFS but still..... ...
    (freebsd-questions)
  • Re: whats making executables so large?
    ... each shared library mapped to a separate memory page and memory page ... using Solaris tools to monitor process size and virtual memory. ... The RSS sizes under FreeBSD and Solaris were similar, ... the RSS sizes are nearly identical. ...
    (comp.unix.bsd.freebsd.misc)